cansik / librealsense-java

Intel® RealSense™ SDK 2 wrapper for Java.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No class found error.

SamerDiab opened this issue · comments

Hello, first of thank you @cansik for your contribution.

I am facing the following issue.

java.lang.NoClassDefFoundError: com/jogamp/opengl/GLCapabilitiesImmutable

And this is my stack

java.lang.NoClassDefFoundError: com/jogamp/opengl/GLCapabilitiesImmutable
	at processing.opengl.PGraphicsOpenGL.createPGL(PGraphicsOpenGL.java:712)
	at processing.opengl.PGraphicsOpenGL.<init>(PGraphicsOpenGL.java:569)
	at processing.opengl.PGraphics3D.<init>(PGraphics3D.java:35)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at processing.core.PApplet.makeGraphics(PApplet.java:2246)
	at processing.core.PApplet.createPrimaryGraphics(PApplet.java:2325)
	at processing.core.PApplet.initSurface(PApplet.java:10837)
	at processing.core.PApplet.runSketch(PApplet.java:10776)
	at com.altcommerce.saip.SaipApplication.main(SaipApplication.java:11)
Caused by: java.lang.ClassNotFoundException: com.jogamp.opengl.GLCapabilitiesImmutable
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 12 more
java.lang.RuntimeException: com/jogamp/opengl/GLCapabilitiesImmutable
	at processing.core.PApplet.makeGraphics(PApplet.java:2279)
	at processing.core.PApplet.createPrimaryGraphics(PApplet.java:2325)
	at processing.core.PApplet.initSurface(PApplet.java:10837)
	at processing.core.PApplet.runSketch(PApplet.java:10776)
	at com.altcommerce.saip.SaipApplication.main(SaipApplication.java:11)

Note that this occurs due to adding P3D to size method. I also tried importing the jogamp library to my project via maven, still same error.

Thank you.

Could you please give me a bit more information on how you use the library?
The best thing would be to show me a small example on how you try to use the library.

It seems that you try to run a Processing example, but without including the needed libraries for processing. Please have a look at my gradle file (which inlcudes the relevant libs for processing):

// processing
testCompile group: 'org.processing', name: 'core', version: '3.3.7'

JOGL and the native libs should be added as dependency of processing core:
https://mvnrepository.com/artifact/org.processing/core/3.3.7

I am using maven, and yes the processing library is included. Which is totally weird. What would defer if not using P3D?
Thank you.

Please provide an example.

Otherwise I can not even understand if and how you are using the library. Because the error you get does not appear to be connected with the library (the lib does not evens how up in the stacktrace you provided), more because of something in your processing / maven setup.

I would suggest to head over to ProcessingDiscourse and discuss this error there.

I close this due to no response.