[FIXED]tried and failed. now I ask: 'class not found' or certificate verification issues when running applet online? please and thank you!
in
Integration and Hardware
•
1 year ago
I have a sketch. all it does is display a simple 3d cube and rotate it a little. I export as applet. the generated html will run offline just fine but online it has issues.
FIRST : it will give this error
---------------------------------------------------------------------------------------------
Java Plug-in 1.6.0_31
Using JRE version 1.6.0_31-b05 Java HotSpot(TM) Client VM
Using JRE version 1.6.0_31-b05 Java HotSpot(TM) Client VM
java.lang.ClassNotFoundException: Three_D_basic
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.jdesktop.applet.util.JNLPAppletLauncher.startSubApplet(JNLPAppletLauncher.java:1977)
at org.jdesktop.applet.util.JNLPAppletLauncher.access$200(JNLPAppletLauncher.java:662)
at org.jdesktop.applet.util.JNLPAppletLauncher$5.run(JNLPAppletLauncher.java:1325)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
May 2, 2012 3:31:35 PM org.jdesktop.applet.util.JNLPAppletLauncher displayError
SEVERE: Class not found: Three_D_basic
--------------------------------------------------------------------------------------------------------------
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.jdesktop.applet.util.JNLPAppletLauncher.startSubApplet(JNLPAppletLauncher.java:1977)
at org.jdesktop.applet.util.JNLPAppletLauncher.access$200(JNLPAppletLauncher.java:662)
at org.jdesktop.applet.util.JNLPAppletLauncher$5.run(JNLPAppletLauncher.java:1325)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
May 2, 2012 3:31:35 PM org.jdesktop.applet.util.JNLPAppletLauncher displayError
SEVERE: Class not found: Three_D_basic
--------------------------------------------------------------------------------------------------------------
SECOND: Changing this gets rid of the 'class not found error'
if i change the jnlp extension from
http://jogamp.org/deployment/jogamp-current/jogl-all-awt.jnlp
to any other version I get certificate errors. which i understand if sun/oracle havnt updated their certificates.
----------------------------------------------------------------------------------------------------------------------------------------
FINALLY:
I HAVE self signed my jars
I HAVE unistalled/reinstalled and tried to update my java jdk and what not.
I dont know what I am missing or understand the inner workings of java enough to know where to actually look.
QUESTIONS:
1. when processing exports an applet is there an actual '.class' file generated? because mine does not create such a thing. i kind of assumed there would be one in the jar if anywhere.
2. do I need to do something in my sketch to make things work?
like:
thisSketch extends pApplet{......and then the sketch } .. or something
I am running win 7x64
processing 2.0a5
java version 6
IE9 or Firefox both fail
<-------------------------------------------->
Sketch
<-------------------------------------------->
void setup(){
size(400,400, P3D);
fill(255, 190);
}//setup
size(400,400, P3D);
fill(255, 190);
}//setup
void draw(){
pushMatrix();
translate(150,150,0);
rotateX(10);
rotateY(10);
rotateZ(10);
box(100);
popMatrix();
}//draw
pushMatrix();
translate(150,150,0);
rotateX(10);
rotateY(10);
rotateZ(10);
box(100);
popMatrix();
}//draw
<-------------------------------------------->
end sketch
<--------------------------------------------->
<---------------------------------------------->
html part that matters
<---------------------------------------------->
.........
<div id="content">
<div id="Three_D_basic_container">
<applet code="org.jdesktop.applet.util.JNLPAppletLauncher"
width="400"
height="400"
archive="Three_D_basic.jar,opengl.jar,core.jar,
http://jogamp.org/deployment/jogamp-current/jar/applet-launcher.jar,
http://jogamp.org/deployment/jogamp-current/jar/jogl.all.jar,
http://jogamp.org/deployment/jogamp-current/jar/gluegen-rt.jar">
<!-- http://jogamp.org/deployment/webstart/jogl-demos/jogl-demos.jar-->
<param name="codebase_lookup" value="false" />
<param name="subapplet.classname" value="Three_D_basic" />
<!--<param name="subapplet.displayname" value="Pretty Name Here">-->
<param name="noddraw.check" value="true" />
<param name="progressbar" value="true" />
<param name="jnlpNumExtensions" value="1" />
<param name="jnlpExtension1"
value=" http://jogamp.org/deployment/jogamp-current/jogl-all-awt.jnlp" />
<param name="java_arguments" value="-Dsun.java2d.noddraw=true" />
<!--<param name="jnlp_href" value="applet-gears.jnlp">-->
<p>
<strong>
This browser does not have a Java Plug-in.
<br />
<a href=" http://www.java.com/getjava"
title="Download Java Plug-in">
Get the latest Java Plug-in here.
</a>
</strong>
</p>
<div id="Three_D_basic_container">
<applet code="org.jdesktop.applet.util.JNLPAppletLauncher"
width="400"
height="400"
archive="Three_D_basic.jar,opengl.jar,core.jar,
http://jogamp.org/deployment/jogamp-current/jar/applet-launcher.jar,
http://jogamp.org/deployment/jogamp-current/jar/jogl.all.jar,
http://jogamp.org/deployment/jogamp-current/jar/gluegen-rt.jar">
<!-- http://jogamp.org/deployment/webstart/jogl-demos/jogl-demos.jar-->
<param name="codebase_lookup" value="false" />
<param name="subapplet.classname" value="Three_D_basic" />
<!--<param name="subapplet.displayname" value="Pretty Name Here">-->
<param name="noddraw.check" value="true" />
<param name="progressbar" value="true" />
<param name="jnlpNumExtensions" value="1" />
<param name="jnlpExtension1"
value=" http://jogamp.org/deployment/jogamp-current/jogl-all-awt.jnlp" />
<param name="java_arguments" value="-Dsun.java2d.noddraw=true" />
<!--<param name="jnlp_href" value="applet-gears.jnlp">-->
<p>
<strong>
This browser does not have a Java Plug-in.
<br />
<a href=" http://www.java.com/getjava"
title="Download Java Plug-in">
Get the latest Java Plug-in here.
</a>
</strong>
</p>
</applet>
</div>
.......
</div>
.......
<-------------------------------------------->
end html part that matters
<--------------------------------------------->
the files created by exporting an applet:
core.jar
/// I have multi jar unchecked in preferences, should this really be here if there are no libraries imported?
index.html
loading.gif
opengl.jar
Three_D_basic.jar
Three_D_basic.java
Three_D_basic.pde
...class file?
I know this is a lot of info but if there is anything I am missing to settle this problem please let me know. Thank you so much for your time even if you just read this over. I hope someone, including myself , can learn from this.
have a nice day!
--------------------------------------------------------------------------------------------------------------------------------------------
FINAL UPDATE [from me] FOR THIS THREAD:
so i got it to work. the steps are
1. create sketch
2.export applet
3.use jarsigner to sign core.jar and yoursketchname.jar or anyother .jar file if needed
4. create jnlp file for yoursketchname.jar
5. open and edit html file and update 'href' for jnlp file and its location
6. make sure your jogl path is correct and has the correct version
7. update jogl.jnlp file to correct path of jogl.jar and gluegen.jar [also goes for gluegen.jnlp]
a good explanation to get yourself started is found here:
my apps will load and work. I am having trouble with my .obj and textures now but i dont think that is related. I created a new topic here:
thank you!
1