Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (538)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (600)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  [solved] Jogl Applet with JNLP runs in eclipse but not in the browser  (Read 1700 times)
0 Members and 1 Guest are viewing this topic.
Offline WarrenFaith

Junior Newbie





« Posted 2011-01-25 17:03:14 »

Hi,

I am developing an applet for some OpenGL ES stuff using JOGL. In eclipse I can start the applet but in the browser I have trouble because the java console prints a NoSuchMethodError in my line where I create an instance of GLCanvas.
1  
2  
3  
4  
5  
6  
7  
GLProfile glp = GLProfile.get(GLProfile.GL2ES2);

GLCapabilities caps = new GLCapabilities(glp);
caps.setSampleBuffers(true);
caps.setNumSamples(8);

glCanvas = new GLCanvas(caps); // throws NoSuchMethodError


1  
2  
3  
4  
5  
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)
   at de.beuthhochschule.bachelor.martin.Benchmark.init(Benchmark.java:42)
   at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Plugin2Manager.java:1620)
   at java.lang.Thread.run(Thread.java:662)


I created a jar with and without the jogl.all.jars (and gluegen, nativewindow and newt) but it just didn't work.
Does someone have an idea?

My JNLP:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
<?xml version="1.0" encoding="utf-8"?>
<jnlp href="applet-benchmark.jnlp" codebase=".">
  <information>
    <title>WebGL-Benchmark</title>
    <vendor>Martin Breuer</vendor>
    <homepage href="http://localhost/"/>
    <description>Native reference implementation</description>
    <description kind="short">Reference implementation of the WebGL Benchmark</description>
    <offline-allowed/>
  </information>

    <resources>
      <j2se href="http://java.sun.com/products/autodl/j2se" version="1.6+"/>
      <property name="sun.java2d.noddraw" value="true"/>
      <jar href="http://localhost/benchmark.jar" main="true"/>
      <extension name="newt-all-awt" href="http://jogamp.org/deployment/webstart/newt-all-awt.jnlp" />
    </resources>

  <applet-desc
      name="WebGL-Benchmark"
      main-class="de.beuthhochschule.bachelor.martin.Benchmark"
      width="660"
      height="500">
  </applet-desc>
</jnlp>


My applet tag:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
<applet codebase="." code="org.jdesktop.applet.util.JNLPAppletLauncher" width=600 height=400
  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"
>
    <param name="codebase_lookup" value="true">
    <param name="subapplet.classname" value="de.beuthhochschule.bachelor.martin.Benchmark">
    <param name="subapplet.displayname" value="WebGL-Benchmark">
    <param name="noddraw.check" value="true">
    <param name="progressbar" value="true">
    <param name="jnlpNumExtensions" value="1">
    <param name="jnlpExtension1" value="http://jogamp.org/deployment/webstart/jogl-core.jnlp">
    <param name="java_arguments" value="-Dsun.java2d.noddraw=true -Dsun.java2d.opengl=false">
    <param name="jnlp_href" value="http://localhost/applet-benchmark.jnlp">
</applet>
Offline Alan_W

JGO Knight


Medals: 8
Projects: 3


Java tames rock!


« Reply #1 - Posted 2011-01-25 18:54:52 »

Might be security related.  If you haven't already, try signing all the jars.

Time flies like a bird. Fruit flies like a banana.
Offline WarrenFaith

Junior Newbie





« Reply #2 - Posted 2011-01-25 20:34:27 »

I tried that, but nothing changed, the exception is the same.
I also make sure by looking in the JOGL API that the constructor I use is really there.

I made a pastbin of the java console: http://pastebin.com/xjk84pTV

update
As I asked on stackoverflow, too, I just link to the solution: Jogl Applet with JNLP runs in eclipse but not in the browser
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

rwatson462 (29 views)
2014-12-15 09:26:44

Mr.CodeIt (20 views)
2014-12-14 19:50:38

BurntPizza (40 views)
2014-12-09 22:41:13

BurntPizza (75 views)
2014-12-08 04:46:31

JscottyBieshaar (37 views)
2014-12-05 12:39:02

SHC (50 views)
2014-12-03 16:27:13

CopyableCougar4 (47 views)
2014-11-29 21:32:03

toopeicgaming1999 (113 views)
2014-11-26 15:22:04

toopeicgaming1999 (100 views)
2014-11-26 15:20:36

toopeicgaming1999 (30 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!