Serial applet exception
in
Core Library Questions
•
1 year ago
Hey all,
I wrote a screencapture-ambilight program which gets the average color of some areas on the desktop and sends these values to an arduino.
It is working just fine but when I export it as an applet, I get an exception.
I figured out, that it was the Serial-communication which caused the exception so I wrote this small test-sketch:
- import processing.serial.*;
- Serial arduino;
- void setup()
- {
- println(Serial.list());
- arduino = new Serial(this, Serial.list()[0], 9600);
- }
- void draw()
- {
- arduino.write("Test");
- delay(1000);
- }
This is what the debugging of the .jar file is showing:
Exception in thread "main" java.lang.NoClassDefFoundError: processing/core/PApplet
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: processing.core.PApplet
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 13 more
I have no Idea what I should do, my java is up to date and the code always works in the processing-environment..
I appreciate your help. :)
1