Processing in Eclipse: Class Not Found Exception
in
Integration and Hardware
•
2 years ago
Hi, I've done a bit of Processing in Eclipse, but I'm running into a problem I haven't encountered before. I can run the sketch as an Applet, but when I run as Java Application, I get the following error:
Exception in thread "main" java.lang.RuntimeException: java.lang.ClassNotFoundException: DataVizMain
at processing.core.PApplet.main(PApplet.java:7254)
at arc_segments.DataVizMain.main(DataVizMain.java:16)
Caused by: java.lang.ClassNotFoundException: DataVizMain
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:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at processing.core.PApplet.main(PApplet.java:7251)
... 1 more
Everything was working as both Applet and Application until I made a new version of the project by copying and pasting it in the Package Explorer. After I did this, both versions started giving the above error. After deleting the newer version, I'm STILL getting the error. The project directory structure is as follows:
data_viz_integration_02
src
arc_segments
ArcSegment.java
DataVizMain.java
JRE System Library
Referenced Libraries
core.jar
The first few lines of my code are here:
package arc_segments;
import processing.core.*;
public class DataVizMain extends PApplet {
public static void main(String args[]) {
PApplet.main(new String[] { "--present", "DataVizMain" });
}
...
}
Given when this error started appearing (right after I copied the project), I assume it is something really basic that has to do with the Eclipse project directory structure, but I'm just not familiar enough with it to understand what I did wrong. Any help much appreciated, thanks.
Exception in thread "main" java.lang.RuntimeException: java.lang.ClassNotFoundException: DataVizMain
at processing.core.PApplet.main(PApplet.java:7254)
at arc_segments.DataVizMain.main(DataVizMain.java:16)
Caused by: java.lang.ClassNotFoundException: DataVizMain
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:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at processing.core.PApplet.main(PApplet.java:7251)
... 1 more
Everything was working as both Applet and Application until I made a new version of the project by copying and pasting it in the Package Explorer. After I did this, both versions started giving the above error. After deleting the newer version, I'm STILL getting the error. The project directory structure is as follows:
data_viz_integration_02
src
arc_segments
ArcSegment.java
DataVizMain.java
JRE System Library
Referenced Libraries
core.jar
The first few lines of my code are here:
package arc_segments;
import processing.core.*;
public class DataVizMain extends PApplet {
public static void main(String args[]) {
PApplet.main(new String[] { "--present", "DataVizMain" });
}
...
}
Given when this error started appearing (right after I copied the project), I assume it is something really basic that has to do with the Eclipse project directory structure, but I'm just not familiar enough with it to understand what I did wrong. Any help much appreciated, thanks.
1