Fiji command unable to find JOGL library - minimal example

Tags: #<Tag:0x00007fd542fa36a0> #<Tag:0x00007fd542fa3538>


This would be quite a hacky workaround… But of course it’s possible, using the ScriptService, somewhat along these lines:

private ScriptService scripts;

private final String script = """
import com.jogamp.newt.NewtFactory
import com.jogamp.newt.opengl.GLWindow
import com.jogamp.opengl.GL
import com.jogamp.opengl.GL2
import com.jogamp.opengl.GLAutoDrawable
import com.jogamp.opengl.GLCapabilities
import com.jogamp.opengl.GLProfile

glProfile = GLProfile.get(GLProfile.GL2)
glCapabilities = new GLCapabilities(glProfile)
""""foo.groovy", script, true).get();


Yeah, native stuff is quite a pain.

Which version of JOGL is this code known to work with? This looks like a version mismatch thing, so perhaps this direction is just going to lead to dealing with other issues.

So answering your last question:

the ImageJ class has a method: script() that returns a ScriptService

You can then specify the script using run

Arg, @imagejan beat me!

Note that in @imagejan’s example, the file extension is used to detect the language, but the file is never created.


I assume that a very basic JOGL version should do the trick :

But I don’t exactly know which version is strictly required.

But anyway I will try the script trick.

FYI @kephale I also branched SciView and I’m going through initial testings. So far I can’t display a cube but I have good hope :wink:


Feel free to complain loudly about issues you have with SciView!


Ok, where do you prefer ? Gitter, here, in another forum thread, … ?


Another forum thread would be the best spot, and gitter for quick things (which is hard to judge because who knew natives could be such a pain :wink:


And I guess github issues for specific issues, no?


Yes, we are like therapists, issues are our power source!


And the “cleanest commit 2017” prize goes to …


Mistakes are even included in the commit message to highlight the incredible beauty of this solution.

… at least it works


/me raises hand :tired_face: :dizzy: :hurtrealbad: :feelsgood: