Login  Register

Re: Exception: No shader code found

Posted by fmorat on Aug 24, 2023; 10:32pm
URL: https://forum.jogamp.org/Exception-No-shader-code-found-tp4042834p4042906.html

>>please share your module info java file, thx.

>>You still need to hack the shader resource or does it work with GlueGen/JOGL as-is?
>>Please detail a wrap up / summary of the whole situation. Thank you.

Hello, this a summary of the whole situation.

So originally this whole thread started because I was getting this exception:

 "the file .. / ../shader/texture01_xxx.vp cannot be found."

When trying to open my application as a MacOS .app bundle.

The solution was to inject this module-info.java file:

module-info.java

into the jar file:  jogamp-fat.jar

---------------------------------------

To add more context to the whole situation and in the hope of helping others, here is a bit more detail

I've created a Java app that uses  jogamp-fat.jar. It works great when running it from the command line.

I then proceeded to try to bundle it as a MacOS .app application.

First I needed to create a self contained java image of my application. For that I used the java jlink command.

In my case, I used the Ant link task.

Unfortunately jlink only works with .jar files that contain a module-info.java file. I created the module-info file and injected it into the jogamp-fat.jar file. No other changes were made.

After creating the Java image I place it in MyApp.app/Contents/MacOS/

The jar files go here: MyApp.app/Resources/Java/

This is my info.plist file in case it helps anybody:

Info.plist


And that is it. This is all I can think of. Any questions let me know.