请教各位java,带数据库的软件打包成jar可以正常运行,并且能正常访问到数据库,用exe4j转换成exe一直报错。该如何解决?
错误代码:
java.lang.NoClassDefFoundError: java/sql/SQLException
at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3325)
at java.base/java.lang.Class.getDeclaredMethod(Class.java:2631)
at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:82)
at com.exe4j.runtime.WinLauncher.main(WinLauncher.java:94)
Caused by: java.lang.ClassNotFoundException: java.sql.SQLException
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:606)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:168)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 5 more
Uncaught error fetching image:
java.lang.NullPointerException: Cannot invoke "java.net.URL.openConnection()" because "this.url" is null
at java.desktop/sun.awt.image.URLImageSource.getConnection(URLImageSource.java:101)
at java.desktop/sun.awt.image.URLImageSource.getDecoder(URLImageSource.java:111)
at java.desktop/sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:263)
at java.desktop/sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:212)
at java.desktop/sun.awt.image.ImageFetcher.run(ImageFetcher.java:176)