Reputation: 368
Trying to install Java Opengl and keep getting this error
Exception in thread "main" java.lang.InstantiationError: com.jogamp.common.util.locks.RecursiveLock
at javax.media.opengl.awt.GLCanvas.<init>(GLCanvas.java:491)
at javax.media.opengl.awt.GLCanvas.<init>(GLCanvas.java:178)
at javax.media.opengl.awt.GLCanvas.<init>(GLCanvas.java:169)
at Simple.<init>(Simple.java:43)
at Simple.main(Simple.java:20)
what does this mean and what can I do to fix it ?
I'm using Ubuntu 64 bit 14.04 with intel i5processor IDE:Eclipse ;
Upvotes: 0
Views: 4025
Reputation: 15683
You first have to uninstall JOGL from the packet manager if you have already installed it. Then in your project you have to add the necessary libraries to the build path. If you are using maven add this to your dependencies:
<dependencies>
<dependency>
<groupId>org.jogamp.jogl</groupId>
<artifactId>jogl-all-main</artifactId>
<version>${jogl-version}</version>
</dependency>
<dependency>
<groupId>org.jogamp.gluegen</groupId>
<artifactId>gluegen-rt-main</artifactId>
<version>${jogl-version}</version>
</dependency>
</dependencies>
Where ${jogl-version} is property defining the JOGL version. You can either use the property or hard-code the version you want to use:
<properties>
<jogl-version>2.2.1</jogl-version>
</properties>
If you are not using maven you should follow the steps from the project's wiki page: https://jogamp.org/wiki/index.php/Setting_up_a_JogAmp_project_in_your_favorite_IDE
Upvotes: 0