Problem when running applet with Eclipse
in
Integration and Hardware
•
2 years ago
Hi everyone!
Hope this is the right place to post in.
I'm trying to create a processing sketch in Eclipse. I've followes the instructions on Processing.org and now i'm able to create simple sketches with Eclipse, but I have some problem with this one.
I've already tried with the Processing IDE and it works fine, but it does not work with Eclipse and I don't know why. The app will be executed on a website, so I want to run it as a Java Applet.
Here's the code:
- import processing.core.*;
- import processing.opengl.*;
- import codeanticode.glgraphics.*;
- import de.fhpotsdam.unfolding.*;
- import de.fhpotsdam.unfolding.providers.*;
- import de.fhpotsdam.unfolding.utils.*;
- public class bMapped extends PApplet {
- Map mappa;
- public void setup(){
- size(600, 500, GLConstants.GLGRAPHICS);
- smooth();
- mappa = new Map(this, new Google.GoogleMapProvider());
- MapUtils.createDefaultEventDispatcher(this, mappa);
- }
- public void draw(){
- mappa.draw();
- }
- }
It should simply visualize a Map that you can zoom in/out and move by keeping pressed mouse button.
It gives me this exeptions when I try to run it as a Java Applet.
- GLGraphics version: 1.0.0
- GL_ARB_geometry_shader4 extension not available
- GL_ARB_texture_float extension not available
- Exception in thread "Animation Thread" java.lang.NoClassDefFoundError: org/apache/log4j/Logger
- at de.fhpotsdam.unfolding.Map.<clinit>(Unknown Source)
- at bMapped.setup(bMapped.java:15)
- at processing.core.PApplet.handleDraw(Unknown Source)
- at processing.core.PApplet.run(Unknown Source)
- at java.lang.Thread.run(Thread.java:662)
- Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger
- at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
- at java.security.AccessController.doPrivileged(Native Method)
- at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
- at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
- at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
- at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
- ... 5 more
I have an idea that the problem could be caused by security restrictions applied to Java Applet but i'm not sure.
Any help will be appreciate.
Thanks and greetings from Italy(excuse me for my bad english)
Marco
1