Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / May 2005

Tip: Looking for answers? Try searching our database.

Web start problem

Thread view: 
JavaEnquirer - 25 May 2005 12:54 GMT
I get the following problem when I try and run my web start
applications. Webstart launches and then I get:

The following required field is missing from the launch file: <jnlp>

- I've updated the mimi-types in Tomcat 5
- my jnlp file is called test.jnlp
- the jar is called tester.jar with a main class com.chess.ChessTest
- the jar file and the jnlp file are in the same directory on my web
server - Tomcat 5.5\webapps\moose
- the URL I use is correct, I can access other resources in the folder.
- the jar file executes correctly with a double-click
- I'm using Java 5 and windows 2000

Here is my jnlp file:

<?xml version="1.0" encoding="utf-8"?>
<!-- JNLP File for SwingSet2 Demo Application -->
<jnlp spec="1.0+" codebase="http://fitits010162:8080/moose"
href="test.jnlp">
<information>
<title>Demo Application</title>
<vendor>Me</vendor>
<homepage href="help.html"/>
<description>A description</description>
<description kind="short">My first Java web start programdescription>
<icon href="1.gif"/>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.5"/>
<jar href="tester.jar" main="true" />
</resources>
<application-desc main-class="com.chess.ChessTest"/>
</jnlp>
Andrew Thompson - 25 May 2005 13:29 GMT
> <?xml version="1.0" encoding="utf-8"?>
> <!-- JNLP File for SwingSet2 Demo Application -->
[quoted text clipped - 6 lines]
> <description>A description</description>
> <description kind="short">My first Java web start programdescription>

This line is malformed, missing a '</'.  Try, ..

 <description kind="short">My first Java web start program</description>

..instead.

HTH

Signature

Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.LensEscapes.com/  Images that escape the mundane

JavaEnquirer - 25 May 2005 13:45 GMT
Apologies for the typo/cut and pasto - whatever you call it! Without
the malformation, it doesn't work.

<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+" codebase="http://fitits010162:8080/moose"
href="test.jnlp">
<information>
    <title>Demo Application</title>
    <vendor>Me</vendor>
    <homepage href="help.html"/>
    <description>A description</description>
    <description kind="short"> My first Java web start program
</description>
    <icon href="1.gif"/>
    <offline-allowed/>
</information>

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

<resources>
    <j2se version="1.5"/>
    <jar href="tester.jar"/>
</resources>

<application-desc main-class="com.chess.ChessTest"/>

</jnlp>

Thank you for your time.
darko - 25 May 2005 14:00 GMT
i was having similar problem on windows box...
and this was becouse the .jnlp file was utf-8 encoded

i fixed it by converting chars from utf-8 to ascii

ps: if this doesn't help, send me e-mail,
couse i am working in mine project
on web start now

Darko
JavaEnquirer - 25 May 2005 14:45 GMT
That didn't seem to work either I'm afraid! Thanks for the suggestion
though.
Andrew Thompson - 25 May 2005 14:53 GMT
> Apologies for the typo/cut and pasto -

..hmmm.  You know a link to a page that links directly to the JNLP
would save those 'cut and pasto' problems.

>...whatever you call it!

I called it many things, none repeatable in a public forum.  :-(

>..Without the malformation, it doesn't work.

...lazy is it?  ;)

> <?xml version="1.0" encoding="utf-8"?>
> <jnlp spec="1.0+" codebase="http://fitits010162:8080/moose"
[quoted text clipped - 22 lines]
>
> </jnlp>

So.. you *swear* (scouts honour and all) that this is a
'copied and pasted' representation of the JNLP, not
figuratively speaking, but *actually* copied and pasted?

I would prefer you put it on the web, so I can see the
JNLP file and error for myself.  [ And make damn sure it is
*not* an 'all-permissions' app, since I'm not taking that
risk from a link through usenet. ]

Signature

Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.LensEscapes.com/  Images that escape the mundane

Andrew Thompson - 25 May 2005 14:40 GMT
> <resources>
> <j2se version="1.5"/>
> <jar href="tester.jar" main="true" />
> </resources>

Where do you get the 'main="true"' part from?   I do not see
it in this document..
<http://java.sun.com/j2se/1.4.2/docs/guide/jws/developersguide/syntax.html#resources>
And none of the SwingSet2 JNLP, nor either of my JNLP's that I reviewed
has it.

Signature

Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.LensEscapes.com/  Images that escape the mundane

Andrew Thompson - 25 May 2005 14:46 GMT
>> <resources>
>> <j2se version="1.5"/>
[quoted text clipped - 6 lines]
> And none of the SwingSet2 JNLP, nor either of my JNLP's that I reviewed
> has it.

Damn it!  I was incorrectly still looking at the original, and it is
not in the other version you posted..

Signature

Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.LensEscapes.com/  Images that escape the mundane

JavaEnquirer - 25 May 2005 14:58 GMT
I'm not sure where I got the main="true" attribute from, I did see it
somewhere and added it as a last ditch attempt. It doesn't seem to ause
any problems though.
JavaEnquirer - 25 May 2005 14:49 GMT
Ah, problem solved. I was idiotic I'm afraid. When I saved the .jnlp it
saved as type rtf not text. Apologies for wasting everyone's time!
Maybe it'll help the next muppet to emerge from the pit after me!
Andrew Thompson - 25 May 2005 15:00 GMT
> When I saved the .jnlp it saved as type rtf not text.

....what program are you using to edit the files?

[ There is not a single Java editor that I would consider using for
editing anything Java related (including NotePad - if I were that
desparate) that would save as *RTF* format!  ]

Signature

Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.LensEscapes.com/  Images that escape the mundane

JavaEnquirer - 25 May 2005 18:27 GMT
I was using Wordpad. Got my back against the wall time wise and have
been making silly mistakes. Everything works great now, signed the jar,
got it RMIing and "integrated" with a nasty third party applet that
uses JInitiator etc. Pretty neat technology. Thanks again.
Andrew Thompson - 26 May 2005 03:46 GMT
> I was using Wordpad.

In a pinch, Notepad is better in that it saves as
'Text, Text, or Text', but for simple editing I
generally use TextPad <http://www.textpad.com/>.

>..Got my back against the wall time wise and have
> been making silly mistakes. Everything works great now, signed the jar,
> got it RMIing and "integrated" with a nasty third party applet that
> uses JInitiator etc. Pretty neat technology. Thanks again.

You're welcome.

Signature

Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.LensEscapes.com/  Images that escape the mundane



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.