我一直在开发一些可以从 Eclipse 执行而没有任何问题的应用程序,一切都很好。但是当我创建一个可运行的 JAR 文件并执行它时,我收到以下消息:
Catched MalformedURLException: Could not open InputStream for URL 'rsrc:gluegen-
rt_3-natives-windows-i586.jar', while TempJarCache.bootstrapNativeLib() of jar:r
src:gluegen-rt_3-natives-windows-i586.jar!/ (rsrc: + gluegen-rt_3-natives-window
s-i586.jar)
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no gluege
n-rt in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at com.jogamp.common.jvm.JNILibLoaderBase.loadLibraryInternal(JNILibLoad
erBase.java:454)
at com.jogamp.common.jvm.JNILibLoaderBase.access$000(JNILibLoaderBase.ja
va:59)
at com.jogamp.common.jvm.JNILibLoaderBase$DefaultAction.loadLibrary(JNIL
ibLoaderBase.java:90)
at com.jogamp.common.jvm.JNILibLoaderBase.loadLibrary(JNILibLoaderBase.j
ava:328)
at com.jogamp.common.os.DynamicLibraryBundle$GlueJNILibLoader.loadLibrar
y(DynamicLibraryBundle.java:390)
at com.jogamp.common.os.Platform$2.run(Platform.java:249)
at java.security.AccessController.doPrivileged(Native Method)
at com.jogamp.common.os.Platform.loadGlueGenRTImpl(Platform.java:231)
at com.jogamp.common.os.Platform.<clinit>(Platform.java:183)
at javax.media.opengl.GLProfile.<clinit>(GLProfile.java:99)
at org.jzy3d.global.Settings.<init>(Settings.java:12)
at org.jzy3d.global.Settings.getInstance(Settings.java:21)
at com.nda.fuzzy.views.SurfaceViewerFrame.<init>(SurfaceViewerFrame.java
:102)
at com.nda.fuzzy.views.MainFrame$26.actionPerformed(MainFrame.java:579)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown
Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
ce)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
ce)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
ce)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
C:\>java -jar destination.jar
╠рьфрэш
Catched MalformedURLException: Could not open InputStream for URL 'rsrc:gluegen-
rt_3-natives-windows-i586.jar', while TempJarCache.bootstrapNativeLib() of jar:r
src:gluegen-rt_3-natives-windows-i586.jar!/ (rsrc: + gluegen-rt_3-natives-window
s-i586.jar)
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no gluege
n-rt in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at com.jogamp.common.jvm.JNILibLoaderBase.loadLibraryInternal(JNILibLoad
erBase.java:454)
at com.jogamp.common.jvm.JNILibLoaderBase.access$000(JNILibLoaderBase.ja
va:59)
at com.jogamp.common.jvm.JNILibLoaderBase$DefaultAction.loadLibrary(JNIL
ibLoaderBase.java:90)
at com.jogamp.common.jvm.JNILibLoaderBase.loadLibrary(JNILibLoaderBase.j
ava:328)
at com.jogamp.common.os.DynamicLibraryBundle$GlueJNILibLoader.loadLibrar
y(DynamicLibraryBundle.java:390)
at com.jogamp.common.os.Platform$2.run(Platform.java:249)
at java.security.AccessController.doPrivileged(Native Method)
at com.jogamp.common.os.Platform.loadGlueGenRTImpl(Platform.java:231)
at com.jogamp.common.os.Platform.<clinit>(Platform.java:183)
at javax.media.opengl.GLProfile.<clinit>(GLProfile.java:99)
at org.jzy3d.global.Settings.<init>(Settings.java:12)
at org.jzy3d.global.Settings.getInstance(Settings.java:21)
at com.nda.fuzzy.views.SurfaceViewerFrame.<init>(SurfaceViewerFrame.java
:102)
at com.nda.fuzzy.views.MainFrame$26.actionPerformed(MainFrame.java:579)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown
Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
ce)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
ce)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
ce)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
但是,当我使用 WinRAR 将完成的 jar 文件解压缩到文件夹中时,我看到gluegen-rt.jar 在文件夹中并且有我的清单:
Manifest-Version: 1.0
Rsrc-Class-Path: ./ org.hamcrest.core_1.1.0.v20090501071000.jar JTatto
o.jar jogl-all-natives-windows-amd64.jar gluegen-rt-natives-linux-arm
v7hf.jar gluegen-rt_3.jar jogl-all-natives-linux-armv7hf_2.jar jgoodi
es-forms-1.6.0.jar jogl-all-natives-windows-i586.jar jogl-all-natives
-solaris-i586.jar gluegen-rt-natives-linux-armv7.jar org.jzy3d-0.9_2.
jar swt.jar gluegen-rt-natives-macosx-universal_2.jar gluegen_2.jar j
ogl-all-natives-linux-armv7_2.jar gluegen-rt-natives-windows-amd64_3.
jar jogl-all-natives-windows-i586_3.jar gluegen-rt-natives-linux-amd6
4_3.jar jogl-all-natives-solaris-amd64_2.jar swt-debug.jar swt_2.jar
applet-launcher_3.jar gluegen-rt-natives-solaris-amd64_3.jar jgoodies
-looks-2.5.2.jar org.jzyio-0.1.jar jogl-all-natives-linux-armv7hf.jar
gluegen-rt-natives-solaris-i586_2.jar gluegen-rt-natives-linux-armv7
_2.jar swt_3.jar jogl-all-natives-linux-i586.jar gluegen-rt-natives-l
inux-i586_3.jar jogl-all-natives-linux-armv7_3.jar gluegen-rt-natives
-solaris-amd64.jar jogl-all-natives-macosx-universal_2.jar jogl-all-n
atives-windows-amd64_3.jar applet-launcher.jar jogl-all-natives-windo
ws-amd64_2.jar junit.jar org.convexhull.jar jogl-all-natives-linux-am
d64_3.jar log4j-1.2.16.jar jogl-all-natives-macosx-universal.jar glue
gen-rt-natives-macosx-universal_3.jar jogl-all-natives-linux-amd64.ja
r jogl-all-natives-solaris-i586_3.jar gluegen-rt-natives-solaris-amd6
4_2.jar opencsv-2.1_3.jar jogl-all-natives-solaris-amd64.jar gluegen-
rt-natives-windows-i586.jar gluegen-rt-natives-solaris-i586.jar jogl-
all_2.jar jogl-all-natives-linux-armv7.jar gluegen-rt-natives-linux-a
rmv7hf_2.jar jogl-all-natives-windows-i586_2.jar gluegen-rt-natives-l
inux-i586.jar gluegen-rt-natives-linux-i586_2.jar gluegen-rt-natives-
windows-amd64.jar gluegen-rt-natives-windows-i586_2.jar applet-launch
er_2.jar swt-debug_2.jar opencsv-2.1_2.jar commons-math-2.2.jar jogl-
all-natives-solaris-i586_2.jar gluegen-rt-natives-linux-armv7_3.jar j
ogl-all-natives-linux-i586_2.jar gluegen.jar jogl-all-natives-linux-i
586_3.jar gluegen-rt-natives-windows-amd64_2.jar gluegen-rt-natives-l
inux-amd64.jar opencsv-2.1.jar gluegen_3.jar gluegen-rt-natives-linux
-armv7hf_3.jar jogl-all-natives-linux-amd64_2.jar jgoodies-common-1.4
.0.jar jogl-all-natives-solaris-amd64_3.jar org.convexhull_3.jar glue
gen-rt_2.jar org.convexhull_2.jar gluegen-rt-natives-solaris-i586_3.j
ar gluegen-rt.jar jogl-all_3.jar jogl-all-natives-macosx-universal_3.
jar gluegen-rt-natives-macosx-universal.jar gluegen-rt-natives-linux-
amd64_2.jar org.jzy3d-0.9.jar jogl-all-natives-linux-armv7hf_3.jar jo
gl-all.jar gluegen-rt-natives-windows-i586_3.jar
Class-Path: .
Rsrc-Main-Class: com.nda.fuzzy.Main
Main-Class: org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader
错误在哪里?请不要给我任何教程链接,只是帮助我理解问题!