Author Topic: Does anybody has webstart example?  (Read 4210 times)

Offline qjvictor

  • int
  • **
  • Posts: 77
    • View Profile
Does anybody has webstart example?
« on: December 01, 2006, 07:06:42 pm »
I need a web start example.
I try to convert my applet into web start.
Thanks.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Does anybody has webstart example?
« Reply #1 on: December 01, 2006, 07:38:48 pm »
This is the jnlp for Paradroidz:

Code: [Select]
<?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>

Offline qjvictor

  • int
  • **
  • Posts: 77
    • View Profile
Thanks
« Reply #2 on: December 01, 2006, 08:00:02 pm »
Thanks, Olsen.
You always help me a lot.

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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Does anybody has webstart example?
« Reply #3 on: December 01, 2006, 08:30:48 pm »
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):
Code: [Select]
AddType application/x-java-jnlp-file jnlp

Offline qjvictor

  • int
  • **
  • Posts: 77
    • View Profile
Does anybody has webstart example?
« Reply #4 on: December 01, 2006, 08:55:18 pm »
Thanks.
the beta of Java6 fails on it?  what's the meaning?
So what's should the suffix in java 6?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Does anybody has webstart example?
« Reply #5 on: December 01, 2006, 10:48:42 pm »
The suffix should be jar. It fails on zip.