Reputation: 31
In a nutshell, the classpath that I'm setting in Info.plist does not seem to work. I continue to get an error saying that files within the jar files cannot be found.
Some context: I've created a self contained java app using the java jlink command. I've put the files for my java app within a MacOs App bundle. I modified the Info.plist to launch my main Java class. Which it does. The problem is that when I try to use some files that are in a jar file it cannot find them because it apparently cannot see the jar file.
Any ideas on what I could be doing wrong . I put the jar files in :
MakinaCraftApp.app/Contents/Resources/Java
I've even tried referencing the jar file directly with an absolute classpath but it still doesn't work. It is almost as if my MacOs app is prohibited from having access to jar files referenced by a classpath.
Is there some type of permission I do not know about? Any suggestions are greatly appreciated.
This is my Info.plist file:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
<string>bin/MakinaCraftApp</string>
<key>CFBundleGetInfoString</key>
<string>MachinaWJavaApp (1)1.0, Copyright {user} 2004. All rights reserved.</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleIconFile</key>
<string>MachinaWJavaApp (1).icns</string>
<key>CFBundleIdentifier</key>
<string>MakinaCraft</string>
<key>CFBundleName</key>
<string>MachinaWJavaApp2</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0.1</string>
<key>Java</key>
<dict>
<key>MainClass</key>
<string>com.noatechnologies.machinawjava.MachinaWJavaApp</string>
<key>StartOnMainThread</key>
<true/>
<key>Arguments</key>
<array/>
<key>ClassPath</key>
<string>$JAVAROOT/gluegen_rt:$JAVAROOT/gluegen_rt_natives_macosx_universal:$JAVAROOT/jogl_all:$JAVAROOT/jogl_all_natives_macosx_universal:$JAVAROOT/jogamp_fat.jar</string>
</dict>
</dict>
</plist>
One more thing, this is the exception I'm getting:
java.lang. Error: java.lang.RuntimeException: com.jogamp.opengl. GLException: No shader code found (source nor binary) for src: [.. / ../shader/texture01 xxx.vp], bin: null at makinacraftmodule/com.noatechnologies.androidjavaapp.OpenGLAndroidApp.main(OpenGLAndroidApp.java:211) at makinacraftmodule/com.noatechnologies.machinawjava.MachinaWJavaApp.main(MachinaWJavaApp.java:203) at makinacraftmodule/com.noatechnologies.machinawjava.MachinaWJavaApp.main(MachinaWavaApp.¡ava:145) at makinacraftmodule/com.noatechnologies.machinawjava.MachinaWJavaApp.main(MachinaWJavaApp.java:111)
Caused by: java.lang. RuntimeException: com.jogamp.opengl.GLException: No shader code found (source nor binary) for src: [../ ../ shader/ texture01_xxx.vp], bin: null at jogamp.fat/com.jogamp.common.util.awt.AWTEDTExecutor.invoke(AWTEDTExecutor.java:58) at jogamp.fat/jogamp.opengl.awt.AWTThreadingPlugin.invokeOnOpenGLThread(AWTThreadingPlugin.java:103) at jogamp.fat/jogamp.opengl.Threading|mpl.invokeOnOpenGLThread(Threading|mpl.java:201) at jogamp.fat/com.jogamp.opengl.Threading.invokeOnOpenGLThread(Threading.java:202) at jogamp.fat/com.jogamp.opengI.Threading.irvoke(Threading.java:221) at jogamp.fat/com.jogamp.opengl.awt.GLCanvas.display(GLCanvas.java:503) at makinacraftmodule/com.noatechnologies.androidjavaapp.OpenGLAndroidApp.main(OpenGLAndroidApp.java:185)
... 3 more
Caused by: com.jogamp.opengI.GLException: No shader code found (source nor binary) for sc: [. / ../ shader/ texture01 _xxx.vp], bin: null at jogamp.fat/com.jogamp.opengl.util.gIsI.ShaderCode.create(ShaderCode.java:551) at jogamp.fat/com.jogamp.opengl.util.g|sI.ShaderCode.create(ShaderCode.java:706) at jogamp.fat/com.jogamp.opengl.util.g|sI.ShaderCode.create(ShaderCode.java:771) at jogamp.fat/jogamp.opengl.macos.cgI.MacOSXCGLContext.createCALayerShader(MacOSXCGLContext.java:188) at jogamp.fat/jogamp.opengl.macosx.cgl.MacOSXCGLContext.access$4800(MacOSXCGLContext.java:84) at jogamp.fat/jogamp.opengl.macosx.cg|.MacOSXCGLContext$NSOpenGLImpl.associateDrawable(MacOSXCGLContext.java:946) at jogamp.fat/jogamp.opengl.macosx.cgl.MacOSXCGLContext.associateDrawable(MacOSXCGLContext.java:427) at jogamp.fat/jogamp.opengl.GLContextimpl.makeCurrent(GLContextimpl.java:740) at jogamp.fat/jogamp.opengI.GLContextImpl.makeCurrent(GLContextlmpl.java:614) at jogamp.fat/jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1279) at jogamp.fat/jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147) at jogamp.fat/com.jogamp.opengl.awt.GLCanvas$12.run(GLCanvas.iava:1442) at java.desktop/java.awt.event. InvocationEvent.dispatch(InvocationEvent. java:308) at java.desktop/java.awt.EventQueue.dispatchEventlmpl(EventQueue.java:773) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714) at java.base/java.security.AccessController.doPrivileged(Access Controller.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.dolntersectionPrivilege(ProtectionDomain.java:86)
at java.desktop/java.awt. EventQueue.dis patchEvent(EventQueue java:742) at java. desktop/java.awt. EventDis patchThread. pumpOneEventForFilters(EventDispatchThread.java:203) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java. desktop /java.awt.EventDispatchThread.pumpEventsEventDispatchThread.java:101) at java. desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Upvotes: 0
Views: 27