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.
IndexProgramming Questions & HelpSyntax Questions › loading processing libraries in eclipse
Page Index Toggle Pages: 1
loading processing libraries in eclipse (Read 1221 times)
loading processing libraries in eclipse
Aug 22nd, 2009, 10:31am
 
Hi i been using eclipse with processing, it works fine, but i have i question. How can i load a processing library in eclipse?  if i do something like import processing.opengl.*; i get error , any idea of how can i do this?


thanks


Sebastiano
Re: loading processing libraries in eclipse
Reply #1 - Aug 22nd, 2009, 11:05am
 
IIRC, you have to go to project properties, build path, and add the needed jars to the project.
Re: loading processing libraries in eclipse
Reply #2 - Aug 22nd, 2009, 12:15pm
 
hello it worked but not with the sketches that uses opengl. I been using pure opengl in processing, i usually load this:
import processing.core.*;
import processing.opengl.*;
import codeanticode.glgraphics.*;
import javax.media.opengl.GL;

and i have this in my setup
 size(600,600, GLConstants.GLGRAPHICS);

and in my draw i have this:
 GLGraphics renderer = (GLGraphics)g;
 GL gl = renderer.beginGL();

so i can access to the opengl commands using the gl variable in this way:
gl.glRotatef(45, 0, 0, 1);

but it doesnt work im getting this error:


java.lang.NoClassDefFoundError: com/sun/gluegen/runtime/DynamicLookupHelper
     at processing.opengl.PGraphicsOpenGL.<init>(PGraphicsOpenGL.java:112)
     at codeanticode.glgraphics.GLGraphics.<init>(GLGraphics.java:43)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorI
mpl.java:39)
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorA
ccessorImpl.java:27)
     at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
     at processing.core.PApplet.makeGraphics(PApplet.java:1160)
     at processing.core.PApplet.size(PApplet.java:999)
     at processing.core.PApplet.size(PApplet.java:959)
     at solito.setup(solito.java:61)
     at processing.core.PApplet.handleDraw(PApplet.java:1400)
     at processing.core.PApplet.run(PApplet.java:1328)
     at java.lang.Thread.run(Thread.java:613)
java.lang.NoClassDefFoundError: com/sun/gluegen/runtime/DynamicLookupHelper
     at processing.opengl.PGraphicsOpenGL.<init>(PGraphicsOpenGL.java:112)
     at codeanticode.glgraphics.GLGraphics.<init>(GLGraphics.java:43)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorI
mpl.java:39)
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorA
ccessorImpl.java:27)
     at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
     at processing.core.PApplet.makeGraphics(PApplet.java:1160)
     at processing.core.PApplet.size(PApplet.java:999)
     at processing.core.PApplet.size(PApplet.java:959)
     at solito.setup(solito.java:61)
     at processing.core.PApplet.handleDraw(PApplet.java:1400)
     at processing.core.PApplet.run(PApplet.java:1328)
     at java.lang.Thread.run(Thread.java:613)
Exception in thread "Animation Thread" java.lang.RuntimeException: com/sun/gluegen/runtime/DynamicLookupHelper
     at processing.core.PApplet.makeGraphics(PApplet.java:1185)
     at processing.core.PApplet.size(PApplet.java:999)
     at processing.core.PApplet.size(PApplet.java:959)
     at solito.setup(solito.java:61)
     at processing.core.PApplet.handleDraw(PApplet.java:1400)
     at processing.core.PApplet.run(PApplet.java:1328)
     at java.lang.Thread.run(Thread.java:613)



any idea?
Re: loading processing libraries in eclipse
Reply #3 - Aug 22nd, 2009, 1:01pm
 
To you have to add opengl.jar AND jogl.jar to your building path -> library. And additional you have to set the native library folder of jogl in my case its 'opengl/library'.
Re: loading processing libraries in eclipse
Reply #4 - Aug 22nd, 2009, 10:40pm
 
Hi , how can i set the native library of jogl? which options should i select?

thanks
Re: loading processing libraries in eclipse
Reply #5 - Aug 23rd, 2009, 1:57pm
 
Configure Buildpath -> libraries -> Add jogl -> now you see jogl in your libraries -> expand jogl -> native library location
Page Index Toggle Pages: 1