Error with webstart

Started by kobeto, September 12, 2004, 12:36:39 AM

Previous topic - Next topic

kobeto

I have an error when i change to opengl mode on webstart. it says:


no lwjgl in java.library.path

...

java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path

   at java.lang.ClassLoader.loadLibrary(Unknown Source)

   at java.lang.Runtime.loadLibrary0(Unknown Source)

   at java.lang.System.loadLibrary(Unknown Source)
...

something like that,

and if someone can tell me how i set up webstart so it load files from within the JAR file.   ... is loading from the directories outside the jar ... (/models,/textures etc)

thx ^^

EgonOlsen

All i can offer is the jnlp-file that i made for a small jPCT-webstart-demo. It still uses LWJGL-0.8 but that doesn't matter:

(To load the resources from the JARs, you have to use the InputStream-Loaders...there should be a thread around here that shows this IIRC).

<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="http://www.jpct.net/webstart" href="demo4.jnlp">
<information>
<title>jPCT Webstart-demo - verbose</title>
<vendor>jPCT - http://www.jpct.net</vendor>
<homepage href="http://www.www.jpct.net"/>
<description>jPCT Webstart-demo - verbose</description>
<icon href="icon.gif"/>
<icon kind="splash" href="logo.jpg"/>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se href="http://java.sun.com/products/autodl/j2se" version="1.2+" initial-heap-size="64m" max-heap-size="256m"/>
<jar href="demo.jar"/>
<jar href="resources.jar"/>
<jar href="lib/jpct.jar"/>
</resources>
<resources os="Windows">
<j2se href="http://java.sun.com/products/autodl/j2se" version="1.2+"/>
<jar href="lib/lwjgl-0.8/lwjgl.jar"/>
<nativelib href="lib/lwjgl-0.8/lwjgl.zip"/>
</resources>
<resources os="Linux">
<j2se href="http://java.sun.com/products/autodl/j2se" version="1.2+"/>
<jar href="lib/lwjgl-0.8-linux/lwjgl.jar"/>
<nativelib href="lib/lwjgl-0.8-linux/liblwjgl.zip"/>
</resources>
<application-desc main-class="JPCTDemoWS">
<argument>trilinear</argument>
<argument>16bit</argument>
<argument>verbose</argument>
</application-desc>
</jnlp>



kobeto


kobeto

i tried and tried ... but how i can use LWJGL work on my webstart game.... pls help me. I get ALWAYS ( +100 times already ... ) the same error: "no lwjgl in java.library.path " i know how to fix this with Eclipse :
"-Djava.library.path=..\..\lib\lwjgl-0.9\ -cp ..\..\lib\lwjgl-0.9\lwjgl.jar" etc ..  but i cant do this on webstart  .... or i can do it? =P i dont know .... pls help me ! XD.... maybe is the manifest? maybe the .classpath on the jar? ...

Thanks for your time ^^ .
And sorry for the bother.

EgonOlsen

Hmm...this section of the jnlp should fix the problem: <nativelib href="lib/lwjgl-0.8/lwjgl.zip"/>
I don't know why it doesn't in your case. Please post your jnlp-file and try if my attempt works for you: http://www.jpct.net/webstart/demo4.jnlp
And try to empty your webstart-directory using the option webstart provides for this. Sometimes, it simply doesn't reload the jnlp the way it should.

kobeto

mmm.... dont works .... <?xml version="1.0" encoding="UTF-8"?><jnlp spec="1.0+" codebase="http://kobetoweb.no-ip.com/kobeto/fullmetal" href="fullmetal.jnlp">
<information>
<title>FullMetal jPCT</title>
<vendor>Kobeto</vendor>
<homepage href="http://kobetoweb.no-ip.com"/>
<description>FullMetal</description>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se href="http://java.sun.com/products/autodl/j2se" version="1.2+" initial-heap-size="64m" max-heap-size="256m"/>
<jar href="fm.jar"/>
<jar href="lib/jpct.jar"/>
<jar href="lib/lwjgl.jar"/>
<nativelib href="lib/lwjgl.zip"/>
</resources>
<application-desc main-class="FullMetalTest">
<argument>trilinear</argument>
<argument>16bit</argument>
</application-desc>
</jnlp>

EgonOlsen

I took your jnlp, splitted the resources-tag into the global and the os-specific part (I don't think that it really matters, but it's a good idea anyway...loading a dll on linux is pointless). Running it, i got a message that the resources are not signed using the same certificate. Try to re-sign your jars and the zip using the same certificate. Maybe that will work.

Anonymous

Quote from: "kobeto"I have an error when i change to opengl mode on webstart. it says:


no lwjgl in java.library.path

...

java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path

   at java.lang.ClassLoader.loadLibrary(Unknown Source)

   at java.lang.Runtime.loadLibrary0(Unknown Source)

   at java.lang.System.loadLibrary(Unknown Source)
...

something like that,

and if someone can tell me how i set up webstart so it load files from within the JAR file.   ... is loading from the directories outside the jar ... (/models,/textures etc)

thx ^^

qjvictor

Same problem.

Anybody help me out?

Caused by: java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
   at java.lang.ClassLoader.loadLibrary(Unknown Source)
   at java.lang.Runtime.loadLibrary0(Unknown Source)
   at java.lang.System.loadLibrary(Unknown Source)
   at org.lwjgl.Sys$1.run(Sys.java:75)
   at java.security.AccessController.doPrivileged(Native Method)
   at org.lwjgl.Sys.doLoadLibrary(Sys.java:68)
   at org.lwjgl.Sys.loadLibrary(Sys.java:84)
   at org.lwjgl.Sys.<clinit>(Sys.java:101)
   at org.lwjgl.opengl.AWTGLCanvas.<clinit>(AWTGLCanvas.java:85)
   at com.threed.jpct.AWTGLRenderer.init(Unknown Source)
   at com.threed.jpct.FrameBuffer.enableRenderer(Unknown Source)
   at com.threed.jpct.FrameBuffer.enableGLCanvasRenderer(Unknown Source)

EgonOlsen

When running from webstart or as a stand-alone application?

qjvictor


EgonOlsen

Maybe you can post the jnlp?

qjvictor

following is the jnlp, I just excluded the detail urls and some company information.

<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="http://......" href=".....jnlp">
  <application-desc main-class="com.horse.HorseRunnerMain"/>
  <information>
     <title>...</title>
     <vendor>...</vendor>
     <homepage href="http://......"/>
     <description>...</description>
     <offline-allowed/>
  </information>
  <security>
     <all-permissions/>
  </security>
  <resources>
     <j2se version="1.4+" initial-heap-size="128m" max-heap-size="300m"/>
     <jar href="horseracing.jar" main="true"/>
     <jar href="lib/lwjgl_win.jar" />
  </resources>
  <resources os="Windows">
     <j2se version="1.4+"/>
     <nativelib href="lib/lwjgl_win.jar"/>
     <property name="java.library.path" value="."/>
  </resources>
</jnlp>

qjvictor

and I found the dll must be put into specified folders to be able to load,
such as C:\WINNT\system32;.;

Can I customized the folders to put the dll file?

lwjgl use "org.lwjgl.Sys.loadLibrary" to load the dll, does that mean the dill must be put in some specified folders?

I remember in java System.load() can load dlls in any path, but System.loadLibrary() only loads the dlls in some specified folders, is it the reason?

EgonOlsen

The dll has to come via webstart. Putting it into system32/whatever is a big no no in either case (webstart or application). What is lwjgl_win.jar in your jnlp? Just the java parts? The native parts too? Try to load the java parts (and only the java parts) in the resources section and the native parts in the resources os=... sections. Just zip the dll and rename it to jar (don't use the zip extension like i did in the jnlp above because i had some problems with Java6 and that extension).