我已经尝试了jarfix和jar runner以及cmd命令(" javaw.exe -jar .jar"它写的是[无法访问.jar])
这是我的java版本: java版" 1.8.0_151" Java(TM)SE运行时环境(版本1.8.0_151-b12) Java HotSpot(TM)64位服务器VM(版本25.151-b12,混合模式)
尝试: 1.java -jar" C:\ Path to File \ myJar.jar" 结果:失败
堆栈跟踪:
Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.NoClassDefFoundError: joptsimple/OptionException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.privateGetMethodRecursive(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at sun.launcher.LauncherHelper.validateMainClass(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source) Caused by: java.lang.ClassNotFoundException: joptsimple.OptionException
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 7 more