Does anybody has webstart example?

Started by qjvictor, December 01, 2006, 07:06:42 PM

Previous topic - Next topic

qjvictor

I need a web start example.
I try to convert my applet into web start.
Thanks.

EgonOlsen

This is the jnlp for Paradroidz:

<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+" codebase="http://www.jpct.net/para3d2" href="test.jnlp">
<application-desc main-class="naroth.start.StartFrame"/>
<information>
<title>Paradroidz</title>
<vendor>jPCT - http://www.jpct.net</vendor>
<homepage href="http://www.jpct.net/paradroidz"/>
<description>Paradroidz -  a 3d remake of the C64 classic game</description>
<icon href="logo.jpg"/>
<icon kind="splash" href="splash.jpg"/>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.4+" initial-heap-size="128m" max-heap-size="300m"/>
<jar href="Naroth.jar"/>
<jar href="lib/jpct.jar"/>
<jar href="lib/lwjgl.jar"/>
<jar href="lib/lwjgl_util.jar"/>
</resources>
<resources os="Windows">
<j2se version="1.4+"/>
<nativelib href="lib/lwjgl_win.jar"/>
<property name="java.library.path" value="." />
</resources>
<resources os="Linux" arch="i386">
<j2se version="1.4+"/>
<nativelib href="lib/lwjgl_linux.jar"/>
<property name="java.library.path" value="." />
</resources>
  <resources os="Mac OS X">
<j2se version="1.4+"/>
    <nativelib href="lib/lwjgl_osx.jar"/>
<property name="java.library.path" value="." />
  </resources>
</jnlp>

qjvictor

Thanks, Olsen.
You always help me a lot.

I've never done web start before. Is the webstart such a thing:
webstart = application+jnlp?

EgonOlsen

Yes. Plus you have to sign the application and all the used librarys, because native parts are downloaded to the client that can't be executed in an untrusted environment. Make also sure, that everything ends with ".jar". ".zip" is supported by 1.5, but the beta of Java6 fails on it.
You also have to make sure that your webserver is capable of sending the correct contenttype for jnlp-files. If it isn't, you can put the jnlp-content in a php- or jsp-script and let that set the contenttype. Or, if the server supports it, use a .htaccess file that defines the correct type-mapping like so (that's what i'm doing): AddType application/x-java-jnlp-file jnlp

qjvictor

Thanks.
the beta of Java6 fails on it?  what's the meaning?
So what's should the suffix in java 6?

EgonOlsen

The suffix should be jar. It fails on zip.