We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
OpenGL and Netbeans (Read 2912 times)
OpenGL and Netbeans
Jan 19th, 2010, 5:37am
 
Hi

I'm new to Processing and trying to use the render option "OPENGL" in the size() method.

I use Netbeans 6.8 and have the core.jar, opengl.jar and jogl.jar jars in my library folder.

In my Java file I have:

import processing.core.PApplet;
import processing.opengl.*;

and running as an application with the following main():

   /** Start PApplet as a Java program (can also be run as an applet). */
   static public void main(String args[])
   {
       PApplet.main( new String[] {"hedgehog_samples.processing.Processing2DSample0"} );
   }

When I run the app I get the following errors:

java.lang.NoClassDefFoundError: com/sun/gluegen/runtime/DynamicLookupHelper
       at processing.opengl.PGraphicsOpenGL.<init>(PGraphicsOpenGL.java:113)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
//...

I came across the following links:

capturevision.blogspot.com/2008/04/starting-to-use-processing-from.html
processing.org/discourse/yabb2/num_119146.html
8953


and tried including

-Djava.library.path=".../processing-1.0.9/libraries/opengl/library"

in the VM Options field.

But still can't get the application to work.

My setup is:
Windows 7
64-bit
Netbeans 6.8

Thanks

Any help greatly appreciated.

Re: OpenGL and Netbeans
Reply #1 - Jan 19th, 2010, 6:48am
 
that missing method (DynamicLookupHelper) is in the gluegen-rt.jar which is also part of the processing distribution. that also needs to be in your classpath.
Re: OpenGL and Netbeans
Reply #2 - Jan 19th, 2010, 7:39am
 
Hi

Thanks for your reply.

I added the rt gluegens to the library node and hence the classpath dist folder and now get:

Exception in thread "Animation Thread" java.lang.UnsatisfiedLinkError: ...\processing-1.0.9\libraries\opengl\library\jogl.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform

with the VM Option:

-Djava.library.path=".../processing-1.0.9/libraries/opengl/library"
Re: OpenGL and Netbeans
Reply #3 - Jan 19th, 2010, 8:28am
 
i'm guessing it can't load IA 32-bit .dll on a AMD 64 platform.

there are windows amd64 jars in that directory (well, there are in mine) and each of them contains a .dll

jogl-natives-windows-amd64.jar

Code:

koogy> jar tvf jogl-natives-windows-amd64.jar
296 Fri May 15 16:55:46 BST 2009 META-INF/MANIFEST.MF
379 Fri May 15 16:55:46 BST 2009 META-INF/JAVA_MED.SF
5295 Fri May 15 16:55:46 BST 2009 META-INF/JAVA_MED.RSA
0 Fri May 15 16:54:56 BST 2009 META-INF/
351232 Thu May 22 02:45:04 BST 2008 jogl.dll
9216 Thu May 22 02:45:04 BST 2008 jogl_awt.dll
131072 Thu May 22 02:45:06 BST 2008 jogl_cg.dll

(same for the gluegen 64 bit jar)

i vaguely remember having to unpack some jars as it couldn't find the dlls within them but that was years ago and 64bit linux. that will no doubt break your ability to publish and share sketches.
Re: OpenGL and Netbeans
Reply #4 - Jan 19th, 2010, 8:29am
 
or you might just need to copy the relevant native files to your classpath

(am not sure your

-Djava.library.path=".../processing-1.0.9/libraries/opengl/library"

is working. is that 3 dots? why?)
Re: OpenGL and Netbeans
Reply #5 - Jan 19th, 2010, 1:16pm
 
Hi

Thanks for your replies.

I discovered that the jogl.ddl shipped with the Processing download is for 32bit.

If I point the VM Option -D path to the Netbeans 6.8 jogl install pack jogl runtime files:

\.netbeans\6.8\jogl-runtime\jogl.jar-natives-windows-amd64\jogl.dll

then it loads ok.

Sorry for the confusion, when I wrote "..." I just meant redundant path info before the Processing directory.

I don't think the amd64.jar is sufficient as it requires the 64bit jogl.dll in the same folder. The Netbeans jogl pack provides both the .jar and already unpacked .dll files.

Thanks

Graham

PS. Looks a 64bit Processing download is required.
Page Index Toggle Pages: 1