Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (487)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (553)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Webstart fails to find the lib's :(  (Read 2418 times)
0 Members and 1 Guest are viewing this topic.
Offline systat

Senior Newbie


Projects: 2



« Posted 2009-02-15 10:04:29 »

Hi, I am using netbeans to deploy my webstart app, and while it works fine when runned like normal applications, when I try to run it like Web Start I get this.
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
java.lang.reflect.InvocationTargetException
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at com.sun.javaws.Launcher.executeApplication(Unknown Source)
   at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
   at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
   at com.sun.javaws.Launcher.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
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.Display.<clinit>(Display.java:128)
   at org.newdawn.slick.AppGameContainer$1.run(AppGameContainer.java:39)
   at java.security.AccessController.doPrivileged(Native Method)
   at org.newdawn.slick.AppGameContainer.<clinit>(AppGameContainer.java:36)
   at moonlander.TheGame.main(TheGame.java:231)
   ... 9 more


I put the -Djava.library.path=\lib as VM arguments.


Please help.
Offline CommanderKeith
« Reply #1 - Posted 2009-02-15 11:39:07 »

Let us see your jnlp file and we may be able to help more

Offline systat

Senior Newbie


Projects: 2



« Reply #2 - Posted 2009-02-15 17:21:29 »

Let us see your jnlp file and we may be able to help more

Sure, here you go, it is netbeans generated


1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<jnlp codebase="http://89.164.146.196/webstart" href="launch.jnlp" spec="1.0+">
    <information>
        <title>MoonLander</title>
        <vendor>Systat</vendor>
        <homepage href=""/>
        <description>The MoonLander ofcourse</description>
        <description kind="short">MoonLander</description>


    <offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
    <resources>
<j2se java-vm-args="-Djava.library.path=\lib" version="1.5+"/>
<jar eager="true" href="MoonLander.jar" main="true"/>


    <jar href="lib/hiero.jar"/>
<jar href="lib/ibxm.jar"/>
<jar href="lib/jinput.jar"/>
<jar href="lib/jnlp.jar"/>
<jar href="lib/jogg-0.0.7.jar"/>
<jar href="lib/jorbis-0.0.15.jar"/>
<jar href="lib/lwjgl.jar"/>
<jar href="lib/natives-linux.jar"/>
<jar href="lib/natives-mac.jar"/>
<jar href="lib/natives-win32.jar"/>
<jar href="lib/packulike.jar"/>
<jar href="lib/pedigree.jar"/>
<jar href="lib/scalar.jar"/>
<jar href="lib/slick-examples.jar"/>
<jar href="lib/slick-util.jar"/>
<jar href="lib/slick.jar"/>
<jar href="lib/tinylinepp.jar"/>
</resources>
    <application-desc main-class="moonlander.TheGame">

    </application-desc>
</jnlp>
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline cylab

JGO Ninja


Medals: 43



« Reply #3 - Posted 2009-02-15 17:35:54 »

Using natives in Webstart does not work by setting "-Djava.library.path". Take a look add the JNLPs for lauchning the demos http://www.lwjgl.org/demos.php. They use the extension mechanism to link to the LWJGL libraries on the lwjgl homepage.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
<!-- JNLP File for LWJGL Demos --> 
<jnlp
  spec="1.0+"
  codebase="http://lwjgl.org/jnlp/"
  href="lwjgl-demo.php/test.input.TestControllers">
  <information>
    <title>LWJGL Demo [test.input.TestControllers]</title>
    <vendor>LWJGL</vendor>
    <homepage href="http://lwjgl.org/"/>
    <description>Demonstration of LWJGL</description>
    <description kind="short">Technology Preview</description>
    <icon kind="splash" href="logo.png" />
    <offline-allowed/>
  </information>
  <resources>
    <j2se version="1.4+"/>
      <jar href="lwjgl_test.jar"/>
    <jar href="media.jar"/>
    <extension name="lwjgl" href="http://lwjgl.org/jnlp/extension.php" />
  </resources>
  <application-desc main-class="org.lwjgl.test.input.TestControllers">
    </application-desc>
</jnlp>


If you don't want to link to it, you have to add per platform resources to the jnlp files like in the extension descriptor:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
<!-- JNLP Extension File --> 
<jnlp
  spec="1.0+"
  codebase="http://lwjgl.org/jnlp/"
  href="extension.php">
  <information>
    <title>LWJGL</title>
    <vendor>LWJGL</vendor>
    <homepage href="http://lwjgl.org/"/>
    <description>LWJGL webstart extension</description>
    <description kind="short">LWJGL webstart extension</description>
    <icon kind="splash" href="logo.png" />
    <offline-allowed/>
  </information>
  <security>
      <all-permissions/>
  </security>
  <resources>
    <j2se version="1.4+"/>
    <jar href="lwjgl.jar"/>
    <jar href="lwjgl_util.jar"/>
    <jar href="jinput.jar"/>
  </resources>
  <resources os="Windows">
    <j2se version="1.4+"/>
    <nativelib href="native_win32.jar"/>
  </resources>
  <resources os="Linux">
    <j2se version="1.4+"/>
    <nativelib href="native_linux.jar"/>
  </resources>  
  <resources os="Mac OS X">
    <j2se version="1.4+"/>
    <nativelib href="native_macosx.jar"/>
  </resources>
  <resources os="SunOS" arch="x86">
    <j2se version="1.4+"/>
    <nativelib href="native_solaris.jar"/>
  </resources>  
 
  <component-desc />
</jnlp>

Mathias - I Know What [you] Did Last Summer!
Offline systat

Senior Newbie


Projects: 2



« Reply #4 - Posted 2009-02-15 18:39:03 »

I managed to get it to work, but when I try to run jnlp from other computer it keeps crying that resource C:\sbkaojbakbo\Documents and Setting\myresource\someimage.png can't be found  Cry
Offline cylab

JGO Ninja


Medals: 43



« Reply #5 - Posted 2009-02-15 19:47:22 »

You are probably trying to load an image from a file on disk. That does not work with webstart. You have to put your resources in jars and use the this.getClass().getClasloader().getResourceAsStream("/path/to/your/resource/in/a/jar") to load it.

Mathias - I Know What [you] Did Last Summer!
Offline systat

Senior Newbie


Projects: 2



« Reply #6 - Posted 2009-02-15 22:14:42 »

No, I use SLICK, I don't need to use that, anyway, I managed to run it on my DESKTOP computer(the server is runing on my laptop), and one of my friends managed to run webstart, but one, got this error.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
java.lang.ClassNotFoundException: TheGame
   at java.net.URLClassLoader$1.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(Unknown Source)
   at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
   at com.sun.javaws.Launcher.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)


I don't have slightest idea what is causing it.
Offline CommanderKeith
« Reply #7 - Posted 2009-02-16 14:22:30 »

Maybe try getting him to clear his webstart cache and re-try. Webstart is usually more bullet-proof than what you're experiencing. But sometimes when you start off with a faulty jnlp or jars they can stick around in the cache and stuff up the program later.

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

TehJavaDev (17 views)
2014-08-28 18:26:30

CopyableCougar4 (26 views)
2014-08-22 19:31:30

atombrot (39 views)
2014-08-19 09:29:53

Tekkerue (36 views)
2014-08-16 06:45:27

Tekkerue (33 views)
2014-08-16 06:22:17

Tekkerue (22 views)
2014-08-16 06:20:21

Tekkerue (33 views)
2014-08-16 06:12:11

Rayexar (67 views)
2014-08-11 02:49:23

BurntPizza (45 views)
2014-08-09 21:09:32

BurntPizza (36 views)
2014-08-08 02:01:56
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!