Applet throwing NoSuchMethodException
Posted by
WarrenFaith on
Jan 26, 2011; 1:47am
URL: https://forum.jogamp.org/Applet-throwing-NoSuchMethodException-tp2335825.html
Hi,
I have tried dozen ways of creating an applet with JOGL but the result is always the same: I get a NoSuchMethodException when I try to create an instance of GLCanvas.
Java code:
GLProfile glp = GLProfile.get(GLProfile.GL2ES2);
GLCapabilities caps = new GLCapabilities(glp);
caps.setSampleBuffers(true);
caps.setNumSamples(8);
glCanvas = new GLCanvas(caps); // crashes here, worked when started as applet in eclipse
My applet code
<applet code="org.jdesktop.applet.util.JNLPAppletLauncher"
width="660"
height="500"
archive="http://jogamp.org/deployment/util/applet-launcher.jar,
http://jogamp.org/deployment/webstart/nativewindow.all.jar,
http://jogamp.org/deployment/webstart/jogl.all.jar,
http://jogamp.org/deployment/webstart/gluegen-rt.jar,
http://jogamp.org/deployment/webstart/newt.all.jar,
http://192.168.0.39/benchmark.jar">
<param name="codebase_lookup" value="false">
<param name="subapplet.classname" value="de.beuthhochschule.bachelor.martin.Benchmark">
<param name="subapplet.displayname" value="Benchmark">
<param name="noddraw.check" value="true">
<param name="progressbar" value="true">
<param name="website" value="http://www.lagence3d.com/products/udo3/" />
<param name="websitesql" value="http://www.udo-construction.com/dev/scripts/" />
<param name="jnlpNumExtensions" value="1">
<param name="jnlpExtension1"
value="http://download.java.net/media/jogl/jsr-231-2.x-webstart/jogl-core.jnlp">
<param name="java_arguments" value="-Dsun.java2d.noddraw=true">
<param name="jnlp_href" value="applet-benchmark.jnlp">
</applet>
My JNLP code:
<?xml version="1.0" encoding="utf-8"?>
<jnlp href="applet-benchmark.jnlp">
<information>
<title>WebGL-Benchmark</title>
<vendor>Martin Breuer</vendor>
<homepage href="http://192.168.0.39/"/>
<description>Native reference implementation</description>
<description kind="short">Reference implementation of the WebGL Benchmark</description>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/>
<property name="sun.java2d.noddraw" value="true"/>
<jar href="http://192.168.0.39/benchmark.jar" main="true"/>
<extension name="jogl-all-awt" href="http://jogamp.org/deployment/webstart-next/jogl-all-awt.jnlp" />
</resources>
<applet-desc
name="WebGL-Benchmark"
main-class="de.beuthhochschule.bachelor.martin.Benchmark"
width="660"
height="500">
</applet-desc>
</jnlp>
And finally the java console output (its too much, so I used pastebin):
http://pastebin.com/xjk84pTVI am totally lost...
*edit*
Before asking: When I use the JNLP of the GEARS demo, I can see the demo applet. So basically it should be working...