Webstart problem

I have a little problem, a created all the jnlp files like in the tutorial, I do all the thinks, J upload this on my webserver and still doesn't work. Where I made my mistake ??



http://www.acknex.info/webstart/main.jnlp



This is the link to a file, but it doesn't work it only schows the file, and nothing else.



TIA

I'm getting that too, doesn't it have to do with mime types and your server? Not too sure on this.

Yep, you need to specify the mime type application/x-java-jnlp-file.  In Apache, you can add:

application/x-java-jnlp-file JNLP


to the mime.types file

You could also supposedly put:

AddType application/x-java-jnlp-file .jnlp


in the .htaccess file (I couldn't get that to work though, so I made my jnlp a php file instead)
EDIT: The htaccess method is now working for me, guess the server just needed time or something  :?

To do the php file, just replace

<?xml version="1.0" encoding="UTF-8"?>


with

<?php  header("Content-type: application/x-java-jnlp-file");
echo "<?xml version="1.0" encoding="UTF-8"?>";?>


and rename the .jnlp to .php

Now I have "Unable to lunch application" when I pase:



http://www.acknex.info/webstart/main.php



into my web browser. Whats wrong this time ??

check the exception, the windows-native.jar isn't found

I read it and I fix it but i still have en error:


JNLPException[category: Security Error : Exception: null : LaunchDesc:
<jnlp spec="1.0+" codebase="http://www.acknex.info/webstart/" href="http://www.acknex.info/webstart/main.php">
  <information>
    <title>Test</title>
    <vendor>Aderal</vendor>
    <homepage href="http://www.acknex.info"/>
    <description>Test Webstart</description>
    <description kind="short">short desc</description>
    <offline-allowed/>
  </information>
  <security>
    <all-permissions/>
  </security>
  <update check="timeout" policy="always"/>
  <resources>
    <jar href="http://www.acknex.info/webstart/testowy.jar" download="eager" main="false"/>
    <jar href="http://www.acknex.info/webstart/jme.jar" download="eager" main="false"/>
    <jar href="http://www.acknex.info/webstart/jme-audio.jar" download="eager" main="false"/>
    <jar href="http://www.acknex.info/webstart/jme-awt.jar" download="eager" main="false"/>
    <jar href="http://www.acknex.info/webstart/jme-terrain.jar" download="eager" main="false"/>
    <jar href="http://www.acknex.info/webstart/jme-effects.jar" download="eager" main="false"/>
    <jar href="http://www.acknex.info/webstart/jme-model.jar" download="eager" main="false"/>
    <jar href="http://www.acknex.info/webstart/jme-collada.jar" download="eager" main="false"/>
    <jar href="http://www.acknex.info/webstart/jme-editors.jar" download="eager" main="false"/>
    <jar href="http://www.acknex.info/webstart/jme-font.jar" download="eager" main="false"/>
    <jar href="http://www.acknex.info/webstart/jme-gamestates.jar" download="eager" main="false"/>
    <jar href="http://www.acknex.info/webstart/jme-scene.jar" download="eager" main="false"/>
    <extension href="http://www.acknex.info/webstart/lwjgl.jnlp" name="lwjgl"/>
    <jar href="http://www.acknex.info/webstart/jogg-0.0.7.jar" download="eager" main="false"/>
    <jar href="http://www.acknex.info/webstart/jorbis-0.0.15.jar" download="eager" main="false"/>
    <java version="1.5+"/>
    <nativelib href="http://www.acknex.info/webstart/windows-native.jar" download="eager" main="false"/>
  </resources>
  <application-desc main-class="jmetest.TutorialGuide.HelloTerrain"/>
</jnlp> ]
at com.sun.javaws.LaunchDownload.checkSignedResourcesHelper(Unknown Source)
at com.sun.javaws.LaunchDownload.checkSignedResources(Unknown Source)
at com.sun.javaws.Launcher.prepareLaunchFile(Unknown Source)
at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
at com.sun.javaws.Launcher.launch(Unknown Source)
at com.sun.javaws.Main.launchApp(Unknown Source)
at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
at com.sun.javaws.Main$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)


What should I do ??

it seems you didn’t sign your jars.

They need to be signed to access certain resources.



did you see the wiki entry about webstart?

webstart step by step

When i try to do jarsigner I get an error:



"Certificate chain not found(…)"



Before that I use:



keytool -genkey -alias sig

keytool -export -alias sig -rfc -file sig.x509



to create a key, but it doesn't work, why ??

I too had problems signing using the tutorial command.  I cant say for sure that that was the error I got, but I managed to get the files signed by doing them one at a time using a commands like this:



jarsigner windows-natives.jar sig

gtzpower said:

I too had problems signing using the tutorial command.  I cant say for sure that that was the error I got, but I managed to get the files signed by doing them one at a time using a commands like this:

jarsigner windows-natives.jar sig

I too ran into errors when doing them all at once yesterday. One at a time worked fine for me as well... perhaps a note in the wiki on this. [done]

THX for your help, it works! :slight_smile:



I found another think:



https://applet-launcher.dev.java.net/



what should I do, how should I create an applet to work with my jME jar files ?? I copy the examples with my jar files and jme jar files but it doesn't work:

This is my site:

http://www.acknex.info/webstart/

This is a site code:

<applet code="org.jdesktop.applet.util.JNLPAppletLauncher"
      width=400
      height=300
      archive="testowy.jar,windows-native.jar,macos-native.jar,lwjgl.jar, linux-native.jar, jorbis-0.0.15.jar,
jogg-0.0.7.jar,jme-terrain.jar,jme-scene.jar,jme-model.jar,jme-gamestates.jar,jme-font.jar,jme_effect.jar,
jme-editors.jar,jme-collada.jar,jme-awt.jar,jme-audio.jar,jme.jar,
              http://download.java.net/media/applet-launcher/applet-launcher.jar,
              http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl.jar,
              http://download.java.net/media/gluegen/webstart/gluegen-rt.jar,
              http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl-demos.jar">
  <param name="codebase_lookup" value="false">
  <param name="subapplet.classname" value="jmetest.TutorialGuide.HelloWorld">
  <param name="subapplet.displayname" value="JOGL Gears Applet">
  <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/builds/archive/jsr-231-webstart-current/jogl.jnlp">
</applet>


EDIT:
I have no idea what to do, I try everythink, someone help me ??
http://www.jmonkeyengine.com/jmeforum/index.php?topic=7695.0

Can you look here, last post, this is very important to me. Please help me, I don't know what to do with this.


The answer is not to send private messages to people to get more visibility of your post.  Don't do it again.

I send it only for you.

if i try your link i get the following exception in the applet:

java.lang.ClassCastException: jmetest.TutorialGuide.HelloWorld cannot be cast to java.applet.Applet
   at org.jdesktop.applet.util.JNLPAppletLauncher.startSubApplet(JNLPAppletLauncher.java:1889)
   at org.jdesktop.applet.util.JNLPAppletLauncher.access$200(JNLPAppletLauncher.java:658)
   at org.jdesktop.applet.util.JNLPAppletLauncher$5.run(JNLPAppletLauncher.java:1269)
   at java.awt.event.InvocationEvent.dispatch(Unknown Source)
   at java.awt.EventQueue.dispatchEvent(Unknown Source)



jmetest.TutorialGuide.HelloWorld is not an Applet

Take a look at the test case com.jmex.awt.applet.SimpleJMEApplet, maybe this helps you.

Your right! I forgot this, thanks! But I thought that when I use https://applet-launcher.dev.java.net/ I can white an normal jME project turn it to webstart an it will be working.



http://www.acknex.info/webstart/main.jnlp



Cen someone tell me why it doesn't show up the  HelloWorld window, it loads everythint and later do nothing. :frowning: Its making me so angry! I spent hours and I didn't find the solution why it doesn't star up. :confused:

its best to enable logging in the java control panel

then you can see why it didn't start in the webstart logfile

C:documents and settingsyour nameApplication DataSunJavaDeploymentlog



SEVERE: Exception in game loop
java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path

How fix it ?? Sorry for that kind of question but I have no idea what to do. :frowning:

i guess it can't find the native lwjgl library, did you put the dll or .so into the windows-native.jar ?

I do the native files from the instruction in tutorial, I think it is all right.

I create one more time the native files and I have that error:


<?xml version="1.0" encoding="windows-1250" standalone="no"?>
<!DOCTYPE log SYSTEM "logger.dtd">
<log>
<record>
  <date>2008-05-03T09:09:49</date>
  <millis>1209798589906</millis>
  <sequence>1</sequence>
  <logger>com.sun.deploy</logger>
  <level>FINE</level>
  <class>com.sun.deploy.util.LoggerTraceListener</class>
  <method>print</method>
  <thread>11</thread>
  <message>2008-05-03 09:09:49 com.jme.app.BaseGame start
INFO: Application started.
</message>
</record>
<record>
  <date>2008-05-03T09:09:49</date>
  <millis>1209798589906</millis>
  <sequence>3</sequence>
  <logger>com.sun.deploy</logger>
  <level>FINE</level>
  <class>com.sun.deploy.util.LoggerTraceListener</class>
  <method>print</method>
  <thread>11</thread>
  <message>2008-05-03 09:09:49 com.jme.system.PropertiesIO &lt;init&gt;
INFO: PropertiesIO created
</message>
</record>
<record>
  <date>2008-05-03T09:09:49</date>
  <millis>1209798589953</millis>
  <sequence>5</sequence>
  <logger>com.sun.deploy</logger>
  <level>FINE</level>
  <class>com.sun.deploy.util.LoggerTraceListener</class>
  <method>print</method>
  <thread>11</thread>
  <message>2008-05-03 09:09:49 com.jme.system.PropertiesIO load
INFO: Read properties
</message>
</record>
<record>
  <date>2008-05-03T09:09:50</date>
  <millis>1209798590531</millis>
  <sequence>8</sequence>
  <logger>com.sun.deploy</logger>
  <level>FINE</level>
  <class>com.sun.deploy.util.LoggerTraceListener</class>
  <method>print</method>
  <thread>11</thread>
  <message>2008-05-03 09:09:50 class jmetest.TutorialGuide.HelloWorld start()
SEVERE: Exception in game loop
java.lang.LinkageError: Version mismatch: jar version is '11', native libary version is '12'
at org.lwjgl.Sys.&lt;clinit&gt;(Sys.java:105)
at org.lwjgl.opengl.Display.&lt;clinit&gt;(Display.java:111)
at com.jme.system.lwjgl.LWJGLPropertiesDialog$ModesRetriever.run(Unknown Source)
at com.jme.app.AbstractGame.getAttributes(Unknown Source)
at com.jme.app.BaseGame.start(Unknown Source)
at jmetest.TutorialGuide.HelloWorld.main(HelloWorld.java:51)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
</message>
</record>
<record>
  <date>2008-05-03T09:09:50</date>
  <millis>1209798590531</millis>
  <sequence>9</sequence>
  <logger>com.sun.deploy</logger>
  <level>FINE</level>
  <class>com.sun.deploy.util.LoggerTraceListener</class>
  <method>print</method>
  <thread>11</thread>
  <message>2008-05-03 09:09:50 com.jme.app.BaseSimpleGame cleanup
INFO: Cleaning up resources.
</message>
</record>
<record>
  <date>2008-05-03T09:09:50</date>
  <millis>1209798590687</millis>
  <sequence>11</sequence>
  <logger>com.sun.deploy</logger>
  <level>FINE</level>
  <class>com.sun.deploy.util.LoggerTraceListener</class>
  <method>print</method>
  <thread>11</thread>
  <message>2008-05-03 09:09:50 com.jme.system.lwjgl.LWJGLDisplaySystem &lt;init&gt;
INFO: LWJGL Display System created.
</message>
</record>
<record>
  <date>2008-05-03T09:09:50</date>
  <millis>1209798590718</millis>
  <sequence>13</sequence>
  <logger>com.sun.deploy</logger>
  <level>FINE</level>
  <class>com.sun.deploy.util.LoggerTraceListener</class>
  <method>print</method>
  <thread>11</thread>
  <message>2008-05-03 09:09:50 com.jme.app.BaseGame start
INFO: Application ending.
</message>
</record>
</log>


Copy from the java log files. What shoult I do ??