Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

打包后提示报错。在idea和eclipse中直接运行正常,注释beautyeye代码再打包则正常运行。 #14

Open
zxj5470 opened this issue Dec 2, 2017 · 1 comment

Comments

@zxj5470
Copy link

zxj5470 commented Dec 2, 2017

在ide中运行正常……使用gradle打包后运行报错。
java -jar geotools-jgsk-all-1.0.jar

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

在idea和eclipse中直接运行正常。
将前三行代码注释后在打包也能够正常运行……

zxj5470/geotools-jgsk...ZhMapLoader.java

    public static void initMap() throws Exception {
        BeautyEyeLNFHelper.frameBorderStyle = BeautyEyeLNFHelper.FrameBorderStyle.osLookAndFeelDecorated;
        UIManager.put("RootPane.setupButtonVisible", false);
        BeautyEyeLNFHelper.launchBeautyEyeLNF();

        ZhJMapFrame frame=Main.frame;
        frame.setTitle("GeoTools");
//.....
    }

项目地址;https://github.com/zxj5470/geotools-jgsk

@ice1000
Copy link

ice1000 commented Dec 9, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants