Hi,
But still, I'm a bit confused by the "
You need to use 'Import Library' to add processing.core.PGraphicsJava2D to your sketch" message.. since I use P2D and not Java2D.
I'm building a Processing-based applet.
Until now I've run it
without any problem for at least one year (on firefox, google chrome, also on windows, linux..),
despite using it for hardcore use (heavy dual channel communication with javascript/liveconnect on all browsers, Java exception catched from the Javascript, on-the-fly resizing of the applet, loading of big files inside and so on..but it works, to the end)
But I've just upgraded my Ubuntu, and when starting Firefox on my applet, I got this message :
java version "1.6.0_20"OpenJDK Runtime Environment (IcedTea6 1.9) (6b20-1.9-0ubuntu1)OpenJDK 64-Bit Server VM (build 17.0-b16, mixed mode)java.lang.NullPointerExceptionat sun.applet.PluginAppletViewer.handleMessage(PluginAppletViewer.java:649)at sun.applet.PluginStreamHandler.handleMessage(PluginStreamHandler.java:270)at sun.applet.PluginMessageHandlerWorker.run(PluginMessageHandlerWorker.java:82)java.lang.RuntimeException: Failed to handle message: width 10 height 10 for instance 1at sun.applet.PluginAppletViewer.handleMessage(PluginAppletViewer.java:660)at sun.applet.PluginStreamHandler.handleMessage(PluginStreamHandler.java:270)at sun.applet.PluginMessageHandlerWorker.run(PluginMessageHandlerWorker.java:82)Caused by: java.lang.NullPointerExceptionat sun.applet.PluginAppletViewer.handleMessage(PluginAppletViewer.java:649)... 2 morejava.lang.RuntimeException: You need to use "Import Library" to add processing.core.PGraphicsJava2D to your sketch.at processing.core.PApplet.makeGraphics(Unknown Source)at processing.core.PApplet.init(Unknown Source)at sun.applet.AppletPanel.run(AppletPanel.java:436)at java.lang.Thread.run(Thread.java:636)Exception in thread "Thread-7" java.lang.NullPointerExceptionat sun.applet.AppletPanel.showAppletStatus(AppletPanel.java:947)at sun.applet.AppletPanel.run(AppletPanel.java:607)at java.lang.Thread.run(Thread.java:636)java.lang.RuntimeException: You need to use "Import Library" to add processing.core.PGraphicsJava2D to your sketch.at processing.core.PApplet.makeGraphics(Unknown Source)at processing.core.PApplet.init(Unknown Source)at sun.applet.AppletPanel.run(AppletPanel.java:436)at java.lang.Thread.run(Thread.java:636)
I managed to go back to the old JDK using
sudo update-java-alternatives -s java-6-sun
And it works again.
Do you know anything that may cause this kind of issue? maybe I could change something to make it work on OpenJDK too ?
Thanks in advance,
Julian
1