Very basic test (LWJGL+webstart)

Hi all,

http://www.ribot.co.uk/webstart/

I’m having a few problems getting a basic webstart app to work with LWJGL code (consisting of a single Game class which is in fact an identical copy to that in the test package but with some colour added to the vertices of the spinning rectangle).

I have tested under OS X and everything runs without fault, but on my XP system, the application doesnt even seem to start (the furthest it goes is the completion of downloading the libraries).

Any ideas? Is there a list of dos and don’ts with regard to LWJGL+Webstart development?

[edit: updated link]

On WinXP: no class def found error, org.lwjgl.Display… you’ve got your jnlp all screwed up. Cut ‘n’ paste from the Alien Flux JNLP file to get it right.

It shouldn’t work properly on Webstart btw… LWJGL is b0rked on MacOS at the moment.

Cas :slight_smile:

[quote]On WinXP: no class def found error, org.lwjgl.Display… you’ve got your jnlp all screwed up. Cut ‘n’ paste from the Alien Flux JNLP file to get it right.

It shouldn’t work properly on Webstart btw… LWJGL is b0rked on MacOS at the moment.

Cas :slight_smile:
[/quote]
Righty, I looks as though my jnlp files have incorrect formatting in them (i.e. the unix blocks instead of return lines) - Is this what you mean by screwy? The original JNLP file was created in BBEdit on the Apple, I have now tried creating in different programs on PC, but nothing seems to change with regard to the application starting under XP. In my version of IE, it just displays the file as xml in the browser. :frowning:

The JNLP file that I created was a type of hybrid of Kevin’s and yours.

What eaxctly shouldn’t work under OS X? Input, rendering , audio or everything?

Cheers,

I have created a new JNLP file (with Notepad on the PC), using your Alien-Flux file as a template… But seem to be having the same troubles. :frowning:

http://www.ribot.co.uk/webstart/


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

<!-- JNLP File for LWJGL-based Webstart Deployment Test --> 
<jnlp 
  spec="1.0+" 
  codebase="http://www.ribot.co.uk/webstart/" 
  href="LWJGL_test5.jnlp"> 
  <information> 
    <title>LWJGL test</title> 
    <vendor>Ribot</vendor> 
    <homepage href="http://www.ribot.co.uk/"/> 
    <description>Simple LWJGL Dev Test</description> 
    <description kind="short">Dev test</description> 
    <offline-allowed/> 
  </information> 
  <security> 
      <all-permissions/> 
  </security>
  <resources> 
    <j2se version="1.4+"/> 
    <jar href="testjar.jar"/>
  </resources> 
  <resources os="Windows">
    <j2se version="1.4+"/> 
    <nativelib href="lib/lwjgl-win32.jar"/>
  </resources>
  <resources os="Mac OS">
    <j2se version="1.4+"/> 
    <nativelib href="lib/lwjgl-osx.jar"/>
  </resources> 
  <resources os="Linux" arch="i386">
    <j2se version="1.4+"/> 
    <nativelib href="lwjgl-linux.jar"/>
  </resources> 
  <property key="java.library.path" value="." />
  <application-desc main-class="Game" /> 
</jnlp>

[edit: updated link]


Java Web Start 1.4.2_03 Console, started Mon May 24 18:28:02 CEST 2004

Java 2 Runtime Environment: Version 1.4.2_03 by Sun Microsystems Inc.

java.lang.NoClassDefFoundError: org/lwjgl/Display

      at Game.<clinit>(Game.java:26)
[...]

To get the console:

-start javaws
-file->preferences->advanced->output options->console

Thanks for that, just found that out 10 mins ago by accident. :wink: So basically, it looks like the lwjgl package isn’t being loaded for some reason (line 26 is the first location where I create any objects - in this case it is the first object created from the LWJGL libs.

Maybe, what i’m doing is totally wrong? Would any changes have to be made to org.lwjgl.test.opengl.Game in order to make it webstart compatible?

Now that new JNLP file of yours doesn’t look anything like mine, does it? And if it did, guess what! It’d work :wink:

Cas :slight_smile:

Looks like you just missed out the actual java for LWJGL. (lwjgl.jar?) You’ve packaged up the native jars but not the Java unless of course testjar.jar contains the whole of LWJGL aswell as your code?

Kev

Having dug around a bit in your distro it appears you’ve packaged the actual java as the “nativelib” tag and no included the actuall dll at all?

The java won’t work from the nativelib tag since its expecting to find a native library in a signed jar there. You’ll also need to use a “jar” tag to include the lwjgl.

Just like in the Alien Flux JNLP :wink:

Kev

yep, feeling very dumb at the moment…I stumbled upon JCD webstart demos and had a look at them, analysing the various jar files he was using and came to your conclusion. Well, off to package up these classes and native files.

Expect more postings. :confused: Sorry.

It now works (well, at least on my systems XP and OS X using firefox). I would welcome any additional bug reports.

A quick summary of problems fixed included jar paths and their contents. duh, silly me.

Windows Users

In IE(6SP1) the jnlp file does not launch webstart but instead renders itself as xml. Any ideas and feedback on this? Is this something to do with my server rather than my jnlp file?

OS X Users

There is currently one outstanding problem on OS X with the Safari browser - the browser does not launch webstart but instead just renders the main ‘information’ text from the jnlp file. Does anyone else have this problem?

Notes

I have updated all previous links in this thread to link to my webstart page.

You have to set the MIME type on the server, or use a php or perl script as described in the webstart faq.

Excellent, says Smithers. IE 6 nows works, but at the moment Safari just downloads the php file to disk. :confused:

Thanks for the link Tom!

The demo made my screen go fubar… Tried todo 140HZ . But I have those problems with some of matzons demoes as well (Grass demo)

Middy: I get the same as you, with the demo setting a refresh of 140Hz. Not sure why that figure is picked, but the demo still works very smootly for me on my sys (XPSP1, Geforce2mx 64MB, PIII 1GHz). What are the specs of your sys?

What version of LWJGL is this? The pre-0.9 versions tended to allow modes that the monitor didn’t handle.

Cas :slight_smile:

0.9 - downloaded from LWJGL.org yesterday.

AMD XP 2000+, Gforce 3 ti 200, XP (no service pack1 )

Looks like the display mode selector can still turn up the odd dicky mode. No harm in using a sanity check.

Cas :slight_smile:

I’ll make sure to add checkSanity() to the constructor then!

:wink: