[solved]Problems deploying applet

Using JOGL 2.0, applet has no warnings in eclipse IDE.
Succesfully, Signed the jar file.

Should I not include the classpath when I make the JAR(from eclipse)?

Is the error in my actual JAVA programming(applet runs fine in eclipse) or am I doing something wrong here?

edit - I am using awt, and running Linux Mint 13 OS.

here’s my test link.
http://realchemist.zxq.net/pages/Applets/test.html
And here’s the code for the link/deploy.


<applet code="OrbitalExplorer.orbitalExplorerApp"
      width=258
      height=322
      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://www.angelfire.com/indie/kcsoft/OrbitalExplorer.jar">
   <param name="codebase_lookup" value="false">
   <param name="subapplet.classname" value="orbitalExplorerApp">
   <param name="subapplet.displayname" value="Orbital Explorer Test">
   <param name="noddraw.check" value="true">
   <param name="progressbar" value="true">
   <param name="jnlpNumExtensions" value="1">
   <param name="jnlpExtension1"
          value="http://download.java.net/media/jogl/jsr-231-2.x-webstart/jogl-core.jnlp">
</applet>

My manifest file is solid, my program runs fine, my jar is sealed and signed.

Trying a new approach. I figure the applet is impossible to make work. Kept getting an error about not being able to find “org.jdesktop.applet.util.JNLPAppletLauncher” even after downloading signing and uploading each required .jar …

So now I’m trying with the .jnlp

Here’s what I have going on:
http://realchemist.zxq.net/pages/Applets/test.html


<applet code="org.jdesktop.applet.util.JNLPAppletLauncher"
      width=256
      height=322
      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://www.angelfire.com/indie/kcsoft/orbexplor.jar">
   <param name="codebase_lookup" value="false">
   <param name="subapplet.classname" value="OrbitalExplorer.orbitalExplorerApp">
   <param name="subapplet.displayname" value="OrbitalExplorer">
   <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">
   <param name="jnlp_href" value="http://www.angelfire.com/indie/kcsoft/oe.jnlp">
</applet>

then the oe.jnlp code is


<?xml version="1.0" encoding="utf-8"?>
<jnlp href="http://www.angelfire.com/indie/kcsoft/oe.jnlp">
  <information>
    <title>Orbital Explorer</title>
    <vendor>None</vendor>
    <homepage href="http://www.realchemist.zxq.net"/>
    <description>Atomic orbital demonstrations</description>
    <description kind="short">Atomic orbital demonstrations</description>
    <offline-allowed/>
  </information>

    <resources>
      <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/>
      <property name="sun.java2d.noddraw" value="true"/>
      <jar href="http://www.angelfire.com/indie/kcsoft/orbexplor.jar" main="true"/>
      <extension name="jogl-all-awt" href="http://jogamp.org/deployment/webstart/jogl-all-awt.jnlp" />
    </resources>

  <applet-desc 
      name="OrbitalExplorer"
      main-class="OrbitalExplorer.orbitalExplorerApp"
      width="256" 
      height="320">
  </applet-desc>
</jnlp>

Now I’m getting a fun error:
Exit Exception
Error While Initializing Managers
dump:

ExitException[ 3]JNLParseException[ Could not parse launch file. Error at line 29.]
	at sun.plugin2.applet.JNLP2Manager.redirectLaunchDesc(Unknown Source)
	at sun.plugin2.applet.JNLP2Manager.initialize(Unknown Source)
	at sun.plugin2.main.client.PluginMain.initManager(Unknown Source)
	at sun.plugin2.main.client.PluginMain.access$200(Unknown Source)
	at sun.plugin2.main.client.PluginMain$2.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:722)
Error while initializing manager: ExitException[ 3]JNLParseException[ Could not parse launch file. Error at line 29.], bail out

Is JOGL 2.0 broken or am I really this daft? Does this work on anyone elses machine?

JOGL 2.0 is not broken. Which version of OpenJDK and NetX / IcedTea-Web you use?

Have you looked at this example?

You use an obsolete version of JOGL. The JAR has been renamed jogl-all.jar

I get this when trying your JNLP file:

[quote]net.sourceforge.jnlp.LaunchException: Fatal: Read Error: Could not read or parse the JNLP file.
at net.sourceforge.jnlp.Launcher.fromUrl(Launcher.java:491)
at net.sourceforge.jnlp.Launcher.launch(Launcher.java:283)
at net.sourceforge.jnlp.runtime.Boot.run(Boot.java:202)
at net.sourceforge.jnlp.runtime.Boot.run(Boot.java:51)
at java.security.AccessController.doPrivileged(Native Method)
at net.sourceforge.jnlp.runtime.Boot.main(Boot.java:168)
Caused by: net.sourceforge.jnlp.ParseException: Invalid XML document syntax.
at net.sourceforge.jnlp.Parser.getRootNode(Parser.java:1305)
at net.sourceforge.jnlp.JNLPFile.(JNLPFile.java:206)
at net.sourceforge.jnlp.JNLPFile.(JNLPFile.java:190)
at net.sourceforge.jnlp.JNLPFile.(JNLPFile.java:175)
at net.sourceforge.jnlp.JNLPFile.(JNLPFile.java:161)
at net.sourceforge.jnlp.Launcher.fromUrl(Launcher.java:482)
… 5 more
Caused by: net.sourceforge.nanoxml.XMLParseException: XML Parse Exception during parsing of a html element at line 15: Expected: <
at net.sourceforge.nanoxml.XMLElement.expectedInput(XMLElement.java:1126)
at net.sourceforge.nanoxml.XMLElement.scanElement(XMLElement.java:972)
at net.sourceforge.nanoxml.XMLElement.scanElement(XMLElement.java:967)
at net.sourceforge.nanoxml.XMLElement.scanElement(XMLElement.java:967)
at net.sourceforge.nanoxml.XMLElement.scanElement(XMLElement.java:967)
at net.sourceforge.nanoxml.XMLElement.scanElement(XMLElement.java:967)
at net.sourceforge.nanoxml.XMLElement.parseFromReader(XMLElement.java:512)
at net.sourceforge.nanoxml.XMLElement.parseFromReader(XMLElement.java:464)
at net.sourceforge.jnlp.Parser.getRootNode(Parser.java:1301)
… 10 more
[/quote]

I’m using OpenJDK 7 and NetX / IcedTea 1.2

Just found out I didn’t have the iced-tea plug-in. Wow thanks now hopefully things will come together better. That’s the only example I have been able to get to run.

Does it work on your machine? On mine I have only a grew rectangle :s

and don’t use that: http://download.java.net/media/jogl/jsr-231-2.x-webstart/jogl-core.jnlp

You mix the old JOGL 2.0 (Oracle version) with JogAmp version :s

Ok. Maybe you could use one of my JNLP files as an example and try to make it work with Java Web Start until we find a solution to make it work as an applet:
http://tuer.sourceforge.net/very_experimental/tuer.jnlp

it should draw a white glcanvas with 4 awt buttons on the bottom. when you click on a button it should then display some scattered pyramids. mouse clicking and moving on the canvas rotates the shape. The shapes are representations of atomic orbitals(chemistry) derived from schroedingers equation. Thanks for the file I’m about to give it a shot.

Okay I got it to be a grey blank applet? Not sure why that is just yet.

http://www.realchemist.zxq.net/pages/Applets/test.html

My main class extends Applet, is this wrong? Should I be using newt?

oe.jnlp

<?xml version="1.0" encoding="UTF-8"?>
	<jnlp spec="1.0+" href="http://www.angelfire.com/indie/kcsoft/oe.jnlp">
		<information>
			<title>Orbital Explorer</title>
			<vendor>None</vendor>
			<homepage href="http://www.angelfire.com/indie/kcsoft/"/>
			<description>Atomic orbital demonstrations</description>
			<offline-allowed/>
		</information>
		<security>
			<all-permissions/>
		</security>

		<update check="always" policy="always"/>
		<resources>
			<j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se" initial-heap-size="32m" max-heap-size="256m" java-vm-args="-XX:MaxDirectMemorySize=128M"/>
			<jar href="http://www.angelfire.com/indie/kcsoft/orbexplor.jar" main="true"/>
			<jar href="http://jogamp.org/deployment/webstart/jar/gluegen-rt.jar" main="false"/>
			<jar href="http://jogamp.org/deployment/webstart/jar/jogl.all.jar" main="false"/>
			<property name="sun.java2d.noddraw" value="true"/>
		</resources>
		<application-desc main-class="OrbitalExplorer.orbitalExplorerApp" />
	</jnlp>

test.html


<applet code="org.jdesktop.applet.util.JNLPAppletLauncher"
      width=256
      height=322
      archive="http://jogamp.org/deployment/webstart/jar/gluegen-rt.jar,
               http://jogamp.org/deployment/webstart/jar/jogl.all.jar,
               http://www.angelfire.com/indie/kcsoft/orbexplor.jar">
   <param name="codebase_lookup" value="false">
   <param name="subapplet.classname" value="OrbitalExplorer.orbitalExplorerApp">
   <param name="subapplet.displayname" value="OrbitalExplorer">
   <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-awt.jnlp">
   <param name="java_arguments" value="-Dsun.java2d.noddraw=true">
   <param name="jnlp_href" value="http://www.angelfire.com/indie/kcsoft/oe.jnlp">
</applet>

Found my old applet project that used to work but the jars cerftificates ran out, and it was on an outdated jogl, copied the code with updated libraries except the old jnlp extension no longer exists. It says loading atleast… hahaha

http://realchemist.zxq.net/pages/Applets/test2.html
test2.html


<applet code="org.jdesktop.applet.util.JNLPAppletLauncher"
      width="256"
      height="320"
      archive="http://jogamp.org/deployment/webstart/jar/applet-launcher.jar,
				http://jogamp.org/deployment/webstart/nativewindow.all.jar,
				http://jogamp.org/deployment/webstart/jar/jogl.all.jar,
				http://jogamp.org/deployment/webstart/jar/gluegen-rt.jar,
              http://www.angelfire.com/indie/kcsoft/orbexplor.jar">
   <param name="codebase_lookup" value="false">
   <param name="subapplet.classname" value="OrbitalExplorer.orbitalExplorerApp">
   <param name="subapplet.displayname" value="Orbital Explorer Test">
   <param name="noddraw.check" value="true">
   <param name="noddraw.check.silent" value="true">
   <param name="progressbar" value="true">
   <param name="jnlpNumExtensions" value="1">
   <param name="jnlpExtension1" value="http://jogamp.org/deployment/webstart/jogl-awt.jnlp">
</applet>

This code gives an error:


ExitException[ 3]JNLPException[category: Launch File Error : Exception: java.lang.Exception: JNLP not an applet, nor a JavaFX application : LaunchDesc: 
<jnlp spec="1.0+" codebase="" href="http://www.angelfire.com/indie/kcsoft/oe.jnlp">
  <information>
    <title>Orbital Explorer</title>
    <vendor>None</vendor>
    <homepage href="http://www.realchemist.zxq.net/"/>
    <description>Atomic orbital demonstrations</description>
    <offline-allowed/>
  </information>
  <security>
    <all-permissions/>
  </security>
  <update check="always" policy="always"/>
  <resources>
    <j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se" initial-heap-size="32m" max-heap-size="256m" java-vm-args="-XX:MaxDirectMemorySize=128M"/>
    <property name="sun.java2d.noddraw" value="true"/>
    <jar href="http://www.angelfire.com/indie/kcsoft/orbexplor.jar" download="eager" main="true"/>
    <jar href="http://jogamp.org/deployment/webstart/jar/gluegen-rt.jar" download="eager" main="false"/>
    <jar href="http://jogamp.org/deployment/webstart/jar/jogl.all.jar" download="eager" main="false"/>
    <jar href="http://jogamp.org/deployment/webstart/jar/applet-launcher.jar" download="eager" main="false"/>
  </resources>
  <application-desc main-class="OrbitalExplorer.orbitalExplorerApp"/>
</jnlp> ]
	at sun.plugin2.applet.JNLP2Manager.loadJarFiles(Unknown Source)
	at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:722)

<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="256" height="320">
   <param name="code" value="org.jdesktop.applet.util.JNLPAppletLauncher">
   <param name="archive" value="http://jogamp.org/deployment/webstart/jar/gluegen-rt.jar,
               http://jogamp.org/deployment/webstart/jar/jogl.all.jar,
               http://www.angelfire.com/indie/kcsoft/orbexplor.jar">
   <param name="codebase_lookup" value="false">
   <param name="subapplet.classname" value="OrbitalExplorer.orbitalExplorerApp">
   <param name="subapplet.displayname" value="Orbital Explorer">
   <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-awt.jnlp">
   <param name="java_arguments" value="-Dsun.java2d.noddraw=true">
   <param name="jnlp_href" value="http://www.angelfire.com/indie/kcsoft/oe.jnlp">
   <comment>
     <embed code="org.jdesktop.applet.util.JNLPAppletLauncher"
          width="256" height="320"
          type="application/x-java-applet;version=1.6"
          pluginspage="http://java.sun.com/javase/downloads/ea.jsp"
          archive="http://jogamp.org/deployment/webstart/jar/gluegen-rt.jar,
               http://jogamp.org/deployment/webstart/jar/jogl.all.jar,
               http://www.angelfire.com/indie/kcsoft/orbexplor.jar"
          codebase_lookup="false"
          subapplet.classname="OrbitalExplorer.orbitalExplorerApp"
          subapplet.displayname value="Orbital Explorer"
          noddraw.check value="true"
          progressbar="true"
          jnlpNumExtensions="1"
          jnlpExtension1="http://jogamp.org/deployment/webstart/jogl-awt.jnlp"
          java_arguments="-Dsun.java2d.noddraw=true"
          jnlp_href="http://www.angelfire.com/indie/kcsoft/oe.jnlp">
        <noembed>Sorry, no Java support detected.</noembed>
     </embed>
   </comment>
</object>

My main class extends Applet, is this wrong? Should I be using newt?

Really wasn’t expecting this to take longer than to write the applet. :-\

In my humble opinion, you should run some demos of JOGL deployed as applets, pick one and try to use the same source code to deploy yours. Keep in mind that JNLP protocol in applets is not fully supported by NetX / Icedtea-web. Mixing of signed and unsigned JARs has been broken, there was a regression in Icedtea-web 1.2, it has been fixed in Icedtea-web 1.3. Ask for help on the official JogAmp forum, you will get more replies than here. I’m almost the only contributor of JOGL who comes here, Xerxes and Sven rarely do it. In my humble opinion, the most important thing consists in finding at least one working example that could be a source of inspiration for you. If I were you, I would sign all JARs (including those of JOGL, GlueGen and yours) with the same certificate.

Thanks alot for the advice, I’ll try that route next. This has been a real headache.

problem has been solved by none other then sven. I was using the wrong libraries… :persecutioncomplex:

Thanks again.
http://forum.jogamp.org/Applet-deploy-serious-problems-td4026628.html