Author Topic: Error with webstart  (Read 12302 times)

Offline kobeto

  • byte
  • *
  • Posts: 6
    • View Profile
Error with webstart
« on: September 12, 2004, 12:36:39 am »
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 ^^

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Error with webstart
« Reply #1 on: September 12, 2004, 01:58:24 pm »
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).

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



Offline kobeto

  • byte
  • *
  • Posts: 6
    • View Profile
Error with webstart
« Reply #2 on: September 14, 2004, 03:59:46 am »
ok thank u ^^

Offline kobeto

  • byte
  • *
  • Posts: 6
    • View Profile
Error with webstart
« Reply #3 on: September 14, 2004, 06:44:04 am »
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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Error with webstart
« Reply #4 on: September 14, 2004, 07:45:19 am »
Hmm...this section of the jnlp should fix the problem:
Code: [Select]
<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.

Offline kobeto

  • byte
  • *
  • Posts: 6
    • View Profile
Error with webstart
« Reply #5 on: September 14, 2004, 01:47:02 pm »
mmm.... dont works ....
Code: [Select]
<?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>

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Error with webstart
« Reply #6 on: September 14, 2004, 03:26:30 pm »
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

  • Guest
Re: Error with webstart
« Reply #7 on: December 20, 2005, 12:16:09 am »
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 ^^

Offline qjvictor

  • int
  • **
  • Posts: 77
    • View Profile
Error with webstart
« Reply #8 on: December 20, 2006, 06:22:36 pm »
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)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Error with webstart
« Reply #9 on: December 20, 2006, 07:01:06 pm »
When running from webstart or as a stand-alone application?

Offline qjvictor

  • int
  • **
  • Posts: 77
    • View Profile
Error with webstart
« Reply #10 on: December 20, 2006, 07:13:42 pm »
running webstart

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Error with webstart
« Reply #11 on: December 20, 2006, 07:59:22 pm »
Maybe you can post the jnlp?

Offline qjvictor

  • int
  • **
  • Posts: 77
    • View Profile
Error with webstart
« Reply #12 on: December 20, 2006, 08:02:26 pm »
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>

Offline qjvictor

  • int
  • **
  • Posts: 77
    • View Profile
Error with webstart
« Reply #13 on: December 20, 2006, 08:05:57 pm »
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?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Error with webstart
« Reply #14 on: December 20, 2006, 08:11:31 pm »
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).