Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (499)
Games in Android Showcase (118)
games submitted by our members
Games in WIP (568)
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  
  [solvedish].jnlp error /w code & error  (Read 1602 times)
0 Members and 1 Guest are viewing this topic.
Offline Cakey

Junior Member





« Posted 2009-03-23 23: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

Junior Member





« Reply #1 - Posted 2009-03-23 23: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
« Reply #2 - Posted 2009-03-24 00: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.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Cakey

Junior Member





« Reply #3 - Posted 2009-03-24 00: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

Junior Member





« Reply #4 - Posted 2009-03-24 01: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
« Reply #5 - Posted 2009-03-24 08: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.

Offline Cakey

Junior Member





« Reply #6 - Posted 2009-03-24 17: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]
  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.

Pippogeek (39 views)
2014-09-24 16:13:29

Pippogeek (30 views)
2014-09-24 16:12:22

Pippogeek (20 views)
2014-09-24 16:12:06

Grunnt (45 views)
2014-09-23 14:38:19

radar3301 (28 views)
2014-09-21 23:33:17

BurntPizza (64 views)
2014-09-21 02:42:18

BurntPizza (34 views)
2014-09-21 01:30:30

moogie (42 views)
2014-09-21 00:26:15

UprightPath (50 views)
2014-09-20 20:14:06

BurntPizza (54 views)
2014-09-19 03:14:18
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!