Java-Gaming.org Java4K winners: [ by our judges | by the community ]         
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  Print  
  [solvedish].jnlp error /w code & error  (Read 759 times)
0 Members and 2 Guests are viewing this topic.
Offline Cakey

Full Member
**

Posts: 127



« on: 2009-03-23 19:08:09 »

So I'm working on my first .jnlp file. First of all can you make these in note-pad(it's XML right)? persecutioncomplex
I keep getting this error and it's confusing to me because I definetly have a <JNLP> tag(you can check me code below)
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
MissingFieldException[ The following required field is missing from the launch file: <jnlp>]
   at com.sun.javaws.jnl.XMLFormat.parse(Unknown Source)
   at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
   at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
   at com.sun.javaws.Launcher.updateFinalLaunchDesc(Unknown Source)
   at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
   at com.sun.javaws.Launcher.launch(Unknown Source)
   at com.sun.javaws.Main.launchApp(Unknown Source)
   at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
   at com.sun.javaws.Main$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)


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  
43  
44  
45  
46  
47  
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+" codebase="http://www.caseykneale.000space.com/applets/" href="RunNous.jnlp">
  <information>
    <title>Nous - BETA</title>
    <vendor>Casey Kneale</vendor>
    <homepage href="http://www.caseykneale.000space.com/"/>
    <description>Nous: BETA</description>
    <description kind="short">Have fun ;D!</description>
    <icon href="box.gif"/>
    <icon kind="splash" href="box.gif"/>
    <offline-allowed/>
  </information>
  <security>
    <all-permissions />
  </security>
  <update check="always" policy="always"/>
  <property name="sun.java2d.noddraw" value="true"/>
  <resources>
    <j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se" initial-heap-size="32m" max-heap-size="256m"/>
    <extension name="jogl" href="http://download.java.net/media/jogl/builds/archive/jsr-231-1.1.1/webstart/jogl.jnlp" />
    <jar href="http://www.angelfire.com/psy/reformation/nousWebStart.jar" download="eager" main="true"/>
  </resources>
 <resources os="Windows">
    <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/>
    <jar href="lib/jogl-win32.jar"/>
    <nativelib href="lib/jogl-win32-native.jar"/>    
    <nativelib href="lib/gagetimer-native.jar"/>
  </resources>
  <resources os="SunOS" arch="sparc">
    <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/>
    <jar href="lib/jogl-solsparc.jar"/>
    <nativelib href="lib/jogl-solsparc-native.jar"/>
  </resources>
  <resources os="Linux">
    <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/>
    <jar href="lib/jogl-linux.jar"/>
    <nativelib href="lib/jogl-linux-native.jar"/>
  </resources>
  <resources os="Mac OS">
    <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/>
    <jar href="lib/jogl-macos.jar"/>
    <nativelib href="lib/jogl-macos-native.jar"/>
  </resources>

  <application-desc main-class="NousWindow" />
  <component-desc/>
</jnlp>


I understand what the commands do, but this is my first run in with these files, and I'm not sure what web-start is expecting.

Google helps but it only got me 90%(approx).

Thanks for reading!

Offline Cakey

Full Member
**

Posts: 127



« Reply #1 on: 2009-03-23 19:38:26 »

I think the error was because I used a regular jar and not an executable jar <crosses fingers>
So I found out I need to sign the .jar buttt whenever I bust open command prompt it says keytool doesn't exist?

Offline gouessej

JGO Kernel
*****

Posts: 3560
Medals: 30


TUER


« Reply #2 on: 2009-03-23 20:05:19 »

I already advised you to watch my JNLP file but you haven't done it:

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  
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+" codebase="http://tuer.tuxfamily.org/" href="tuer.jnlp">
  <information>
    <title>TUER</title>
    <vendor>Julien GOUESSE</vendor>
    <homepage href="http://tuer.tuxfamily.org"/>
    <description>Small Quake-like written in Java + JOGL</description>
    <description kind="short">kill them all!!</description>
    <icon href="tuerLogo.png"/>
    <icon kind="splash" href="tuerLogo.png"/>
    <offline-allowed/>
  </information>
  <security>
    <all-permissions />
  </security>
  <update check="always" policy="always"/>
  <property name="sun.java2d.noddraw" value="true"/>
  <resources>
    <j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se" initial-heap-size="32m" max-heap-size="256m"/>  
    [b]<extension name="jogl" href="http://download.java.net/media/jogl/builds/archive/jsr-231-1.1.1/webstart/jogl.jnlp" />[/b]
    <jar href="tuer.jar" download="eager" main="true"/>
  </resources>
  <application-desc main-class="connection.GameServiceProvider" />
  <component-desc/>
</jnlp>


Notice that you don't need to deploy JOGL by yourself.

Don't forget to add a new line at the end, it is a stupid mistake that I did some years ago when I had to fix something in my JNLP file, some editors do not do this automatically.

Julien Gouesse
Games published by our own members! Go get 'em!
Offline Cakey

Full Member
**

Posts: 127



« Reply #3 on: 2009-03-23 20:32:33 »

I do have that line in my file. I added the other lines because that's what this one tutorial said to do. I actually stole a lot of your jnlp file (hopefully that's okay). I got rid of those resource OS lines, because after looking at them again I shouldn't have them in there.
I have an empty line at the end too.

Do you have to sign .jar's? or is that optional? I can't find the tools for it if so.

I think the main problem is how I'm hosting it on angel-fire(free-website garbage)....
I'm getting a different error now.

Java Console error
1  
2  
3  
#### Java Web Start Error:
#### Unsigned application requesting unrestricted access to system
Unsigned resource: http://www.angelfire.com/psy/reformation/nousWebStart.jar


jnlp error
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  
JNLPException[category: Security Error : Exception: null : LaunchDesc: 
<jnlp spec="1.0+" codebase="http://www.angelfire.com/psy/reformation/" href="http://www.angelfire.com/psy/reformation/RunNous.jnlp">
  <information>
    <title>Nous - BETA</title>
    <vendor>Casey Kneale</vendor>
    <homepage href="http://www.caseykneale.000space.com/"/>
    <description>Nous: BETA</description>
    <description kind="short">Have fun ;D!</description>
    <icon href="http://www.angelfire.com/psy/reformation/box.gif" kind="default"/>
    <icon href="http://www.angelfire.com/psy/reformation/box.gif" kind="splash"/>
    <offline-allowed/>
  </information>
  <security>
    <all-permissions/>
  </security>
  <update check="always" policy="always"/>
  <resources>
    <java initial-heap-size="33554432" max-heap-size="268435456" href="http://java.sun.com/products/autodl/j2se" version="1.6+"/>
    <extension href="http://download.java.net/media/jogl/builds/archive/jsr-231-1.1.1/webstart/jogl.jnlp" name="jogl"/>
    <jar href="http://www.angelfire.com/psy/reformation/nousWebStart.jar" download="eager" main="true"/>
  </resources>
  <application-desc main-class="NousWindow.main"/>
</jnlp> ]
   at com.sun.javaws.LaunchDownload.checkSignedResourcesHelper(Unknown Source)
   at com.sun.javaws.LaunchDownload.checkSignedResources(Unknown Source)
   at com.sun.javaws.Launcher.prepareLaunchFile(Unknown Source)
   at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
   at com.sun.javaws.Launcher.launch(Unknown Source)
   at com.sun.javaws.Main.launchApp(Unknown Source)
   at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
   at com.sun.javaws.Main$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)


edit: found the jar signer let's hope my command prompt skillz are still on haha

Offline Cakey

Full Member
**

Posts: 127



« Reply #4 on: 2009-03-23 21:45:26 »

I figured it all out!!!!Gosh I'm so glad dos is dead.
my mac friends still can't see it Sad I guess it just says "Unable to load"
here's the .jnlp
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  
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+" codebase="http://www.angelfire.com/psy/reformation/" href="http://www.angelfire.com/psy/reformation/RunNous.jnlp">
  <information>
    <title>Nous - BETA</title>
    <vendor>Casey Kneale</vendor>
    <homepage href="http://www.caseykneale.000space.com/"/>
    <description>Nous: BETA</description>
    <description kind="short">Have fun ;D!</description>
    <icon href="box.gif"/>
    <icon kind="splash" href="box.gif"/>
    <offline-allowed/>
  </information>
  <security>
    <all-permissions />
  </security>
  <update check="always" policy="always"/>
  <property name="sun.java2d.noddraw" value="true"/>
  <resources>
    <j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se" initial-heap-size="32m" max-heap-size="256m"/>
    <extension name="jogl" href="http://download.java.net/media/jogl/builds/archive/jsr-231-1.1.1/webstart/jogl.jnlp" />
    <jar href="http://www.angelfire.com/psy/reformation/nousWebStart.jar" download="eager" main="true"/>
  </resources>
  <application-desc main-class="NousWindow" />
  <component-desc/>
</jnlp>


and here's the link.|edit: | *new* url = http://www.angelfire.com/psy/reformation/RunNous.jnlp

Offline gouessej

JGO Kernel
*****

Posts: 3560
Medals: 30


TUER


« Reply #5 on: 2009-03-24 04:03:53 »

I didn't understand why you deployed the native files of JOGL twice (once through the extension name, once explicitly in your JNLP file). Good luck.

Edit.: it would be fine if we succeed to repair our JNLP files in order to allow them to work with OpenJDK.

Julien Gouesse
Offline Cakey

Full Member
**

Posts: 127



« Reply #6 on: 2009-03-24 13:21:42 »

haha I've already had enough of this .jnlp nonsense. I think Java needs a more sensible method to deploy web-start applications. It's almost as if Sun doesn't really want people to use them or something. Anything involving the command prompt IMO is dodgy, it's 2009 man.I take that back I just thought about how the JDK/JRE has to work and it makes sense that it's a fairly practical way to deal with that issue. haha.

Also gouessej I fixed that weird thing I was doing having two .jnlp files, that was pretty dumb of me haha

Thanks for helping me get it to work for windows!  Grin

btw any passer-by reader's here the tutorial for signing:
http://www.cokeandcode.com/webstarthowto

and your keytool and jarsigner are in your JDK's BIN folder.

Pages: [1]
  Print  
 
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.059 seconds with 20 queries.