Author Topic: What's wrong with this JWS file?  (Read 9806 times)

Offline kukanani

  • Fierce Warrior
  • ****
  • Posts: 504
  • My game is coming along fairly smoothly...
    • View Profile
    • GameBrewers/Exodus Online
What's wrong with this JWS file?
« on: 19. May 2008, 11:36:35 PM »
I'm trying to deploy my app with Java Web Start, but I keep getting NullPointerExceptions because my application can't find the resources.

Here's my JWS file:

Code: [Select]
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+"
  codebase="http://www.mysite.com/deployment"
  version="1.0" href="MyJavaWebStartFile.jnlp"
  >

  <information>
    <title>My App</title>
    <vendor>Me</vendor>
    <homepage href="http://www.mysite.com"/>
    <description>My App</description>
    <icon kind="splash" href="splash.png"/>
    <menu/>
    <desktop/>
    <shortcut/>
  </information>

  <security>
    <all-permissions/>
  </security>

  <resources>
    <jar href="ApplicationJARWithResourcesIncluded.jar"/>
    <jar href="JustTheResources.jar"/>
    <jar href="jogl.jar"/>
    <jar href="hial.jar"/>
    <jar href="Xith3D.jar"/>
    <jar href="jagatoo.jar"/>
    <jar href="openmali.jar"/>
    <jar href="gluegen-rt.jar"/>
    <jar href="hud-themes.jar"/>
    <jar href="media.jar"/>
    <jar href="jops.jar"/>
  </resources>

  <resources os="Windows">
    <j2se href="http://java.sun.com/products/autodl/j2se" version="1.6+"/>

    <nativelib href="jogl-awt-windows-native.jar"/>
    <nativelib href="jogl-cg-windows-native.jar"/>
    <nativelib href="jogl-windows-native.jar"/>
    <nativelib href="gluegen-windows-native.jar"/>
  </resources>

  <application-desc/>
</jnlp>

Just for safety, you see that I have included two different JARs, ApplicationJARWithResourcesIncluded.jar and JustTheResources.jar, but even with that, my app can't find resources.  I even added a third set of resources which I hoped would help, and that's putting the entire file system of resources directly on my website, un-zipped and un-JARed, but it still doesn't work.  I even tried using ClassLoader.getResource() manually (not using ResourceLocator) and it STILL won't work.

Can someone find my problem?
« Last Edit: 20. May 2008, 02:06:44 AM by kukanani »
xith.setCoolnessLevel(10);
jMe.setCoolnessLevel(0);
xith.rock();

Offline kukanani

  • Fierce Warrior
  • ****
  • Posts: 504
  • My game is coming along fairly smoothly...
    • View Profile
    • GameBrewers/Exodus Online
Re: What's wrong with this JWS file?
« Reply #1 on: 20. May 2008, 02:13:03 AM »
Another thing:

If I move the JWS file and all of the resources un-packaged to the local computer (in the same directory), I can run the client.
xith.setCoolnessLevel(10);
jMe.setCoolnessLevel(0);
xith.rock();

Offline nick561

  • Just dropped in
  • Posts: 1
    • View Profile
Re: What's wrong with this JWS file?
« Reply #2 on: 05. May 2012, 07:03:59 AM »
Thanks kukanani........