Login  Register

Re: Applet throwing NoSuchMethodException

Posted by Sven Gothel on Jan 26, 2011; 2:12am
URL: https://forum.jogamp.org/Applet-throwing-NoSuchMethodException-tp2335825p2349347.html

On Wednesday, January 26, 2011 02:47:56 WarrenFaith [via jogamp] wrote:
>
> 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.

looks all great .. however,
since we have changed the API (GLCapabilities -> GLCapabilitiesImmutable).

You need to recompile (w/o source code change) .. sorry about that.

You compiled classes reference
        cstr 'GLCanvas(javax.media.opengl.GLCapabilities)',
which is now
        cstr 'GLCanvas(javax.media.opengl.GLCapabilitiesImmutable)'

---
#
Exception in thread "thread applet-de.beuthhochschule.bachelor.martin.Benchmark-1" java.lang.NoSuchMethodError: javax.media.opengl.awt.GLCanvas.<init>(Ljavax/media/opengl/GLCapabilities;)V
#
        at de.beuthhochschule.bachelor.martin.Benchmark.initComponents(Benchmark.java:60)
---

http://jogamp.org/deployment/jogamp-next/javadoc/jogl/javadoc/javax/media/opengl/awt/GLCanvas.html#GLCanvas%28javax.media.opengl.GLCapabilitiesImmutable%29

~Sven

>
> 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">
>    
>    
>    
>    
>    
>    
>    
>    
>    
>    
>    
> </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/xjk84pTV
>
> I am totally lost...
>
> _______________________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://jogamp.762907.n3.nabble.com/Applet-throwing-NoSuchMethodException-tp2335825p2335825.html
> To start a new topic under jogl, email [hidden email]
> To unsubscribe from jogl, visit
health & wealth
mailto:
[hidden email] ; http://jausoft.com
land : +49 (471) 4707742 ; cell: +49 (151) 28145941
Timezone CET: PST+9, EST+6, UTC+1