Hello
Im having trouble getting a sketch with ControlP5 to work as an applet. Everything works fine when running in the Processing environment and everything works fine when I "Export Application" and run it on Linux or Windows.
I read this:
export to applet
since the security regulations for applets are very high and strict, you need to make fields and functions that you control with controlP5 public in your code. So i did this in my code (honestly I've only been working w/Processing/Java for about a week..)
Code:
import controlP5.*;
public ControlP5 controlP5;
// for the input box
String startDatetimeInputText = "";
public Textfield startDatetimetTextField;
String endDatetimeInputText = "";
public Textfield endDatetimetTextField;
String srcFilterInputText = "";
public Textfield srcFilterTextField;
String dstFilterInputText = "";
public Textfield dstFilterTextField;
public Button submitButton;
public void setup() {
size(sizeW, sizeH);
controlP5 = new ControlP5(this);
...
}
public void draw() {
...
}
It's certainly possible that I misunderstood the above directions and did something incorrectly...
But I'm not sure this is the issue because when I run the applet in IE the Java Console says:
Exception in thread "Animation Thread" java.lang.NoClassDefFoundError: controlP5/ControlP5
at processing_test.setup(processing_test.java:127)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: controlP5.ControlP5
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 4 more
The offending line (processing_test.java:127) is:
public void setup() {
size(sizeW, sizeH);
controlP5 = new ControlP5(this);In the above Java Console message does
NoClassDefFoundError mean that it can't find the ControlP5 classes? There is a controlP5.jar file in my applet folder
Could someone please help me figure out what I'm missing?
Thanks
Heath