Exception in thread "main" java.util.ServiceConfigurationError: javax.imageio.spi.ImageOutputStreamSpi: Provider com.sun.media.imageioimpl.stream.ChannelImageOutputStreamSpi could not be instantiated
at java.util.ServiceLoader.fail(Unknown Source)
at java.util.ServiceLoader.access$100(Unknown Source)
at java.util.ServiceLoader$LazyIterator.nextService(Unknown Source)
at java.util.ServiceLoader$LazyIterator.next(Unknown Source)
at java.util.ServiceLoader$1.next(Unknown Source)
at javax.imageio.spi.IIORegistry.registerApplicationClasspathSpis(Unknown Source)
at javax.imageio.spi.IIORegistry.<init>(Unknown Source)
at javax.imageio.spi.IIORegistry.getDefaultInstance(Unknown Source)
at javax.imageio.ImageIO.<clinit>(Unknown Source)
at org.jb2011.ninepatch4j.GraphicsUtilities.loadCompatibleImage(GraphicsUtilities.java:17)
at org.jb2011.ninepatch4j.NinePatch.load(NinePatch.java:53)
at org.jb2011.lnf.beautyeye.utils.NinePatchHelper.createNinePatch(NinePatchHelper.java:41)
at org.jb2011.lnf.beautyeye.ch4_scroll.__Icon9Factory__.getResource(__Icon9Factory__.java:51)
at org.jb2011.lnf.beautyeye.ch4_scroll.__Icon9Factory__.getResource(__Icon9Factory__.java:1)
at org.jb2011.lnf.beautyeye.utils.RawCache.getRaw(RawCache.java:48)
at org.jb2011.lnf.beautyeye.ch4_scroll.__Icon9Factory__.getRaw(__Icon9Factory__.java:62)
at org.jb2011.lnf.beautyeye.ch4_scroll.__Icon9Factory__.getScrollPaneBorderBg(__Icon9Factory__.java:213)
at org.jb2011.lnf.beautyeye.ch4_scroll.ScrollPaneBorder.<init>(ScrollPaneBorder.java:33)
at org.jb2011.lnf.beautyeye.ch4_scroll.__UI__.uiImpl(__UI__.java:39)
at org.jb2011.lnf.beautyeye.BeautyEyeLNFHelper.implLNF(BeautyEyeLNFHelper.java:184)
at org.jb2011.lnf.beautyeye.BeautyEyeLookAndFeelWin.<init>(BeautyEyeLookAndFeelWin.java:54)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at javax.swing.UIManager.setLookAndFeel(Unknown Source)
at org.jb2011.lnf.beautyeye.BeautyEyeLNFHelper.launchBeautyEyeLNF(BeautyEyeLNFHelper.java:275)
at top.cuggis.geotools.utils.ZhMapLoader.initMap(ZhMapLoader.java:25)
at top.cuggis.geotools.Main.main(Main.java:29)
Caused by: java.lang.IllegalArgumentException: vendorName == null!
at javax.imageio.spi.IIOServiceProvider.<init>(Unknown Source)
at javax.imageio.spi.ImageOutputStreamSpi.<init>(Unknown Source)
at com.sun.media.imageioimpl.stream.ChannelImageOutputStreamSpi.<init>(ChannelImageOutputStreamSpi.java:64)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
... 28 more
在ide中运行正常……使用gradle打包后运行报错。
java -jar geotools-jgsk-all-1.0.jar
,在idea和eclipse中直接运行正常。 将前三行代码注释后在打包也能够正常运行……
zxj5470/geotools-jgsk...ZhMapLoader.java
项目地址;https://github.com/zxj5470/geotools-jgsk