该程序成功地将jar文件夹提取到文件夹/home/ty/gopro2027game/lib/jars/
,将原生文件提取到/home/ty/gopro2027game/lib/jars/
。除了复制文件之外,该程序还运行此程序:
System.setProperty("java.library.path", Game.gameFolder+"/lib/jars");
System.setProperty("org.lwjgl.librarypath",
new File(Game.gameFolder+"/lib/natives").getAbsolutePath());
System.out.println(System.getProperty("java.library.path"));
System.out.println(System.getProperty("org.lwjgl.librarypath"));
println也显示文件的正确文件夹。但是我在运行时遇到这个错误(这是在导出程序之后):
Exception in thread "main" java.lang.NoClassDefFoundError: org/lwjgl/LWJGLException
at com.gopro2027.lwjgl.Start.Solo(Start.java:144)
at com.gopro2027.lwjgl.Start.main(Start.java:55)
Caused by: java.lang.ClassNotFoundException: org.lwjgl.LWJGLException
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 2 more
我不知道这是怎么回事,我不想回到jarmatey。谢谢 - 泰勒