JWS Program problem with MAC  
Author Message
John B. Matthews





PostPosted: 2008-3-23 9:26:00 Top

java-programmer, JWS Program problem with MAC In article <47e58b1b$0$1630$email***@***.com>,
Knute Johnson <email***@***.com> wrote:

> http://rabbitbrush.frazmtn.com/aviation/

Here's the diagnostic info from a failed run on Mac OS 10.4.11 (ppc),
java version 1.5.0_13:

[General]

An error occurred while launching/running the application.

Category: Launch File Error

No JRE version found in launch file for this system

[Launch File]

<?xml version='1.0' encoding='UTF-8' ?>

<jnlp spec='1.0+'

codebase='http://rabbitbrush.frazmtn.com/aviation'

href="flightlog.jnlp">

<information>

<title>VFR Flight Log</title>

<vendor>Knute Johnson Software</vendor>

<homepage href="index.html"/>

<icon kind="splash" href="catalina.jpg" />

</information>

<resources>

<java version='1.5+' />

<jar href='sVFRFlightLog.jar' />

</resources>

<application-desc

main-class='com.knutejohnson.tools.aviation.vfrlog.VFRFlightLog'>

</application-desc>

<security>

<all-permissions/>

</security>

</jnlp>

[Exception]

NLPException[category: Launch File Error : Exception: null : LaunchDesc:
<jnlp spec="1.0+" codebase="http://rabbitbrush.frazmtn.com/aviation/"
href="http://rabbitbrush.frazmtn.com/aviation/flightlog.jnlp">
<information>
<title>VFR Flight Log</title>
<vendor>Knute Johnson Software</vendor>
<homepage href="http://rabbitbrush.frazmtn.com/aviation/index.html"/>
<icon href="http://rabbitbrush.frazmtn.com/aviation/catalina.jpg"
kind="splash"/>
</information>
<security>
<all-permissions/>
</security>
<resources>
<jar
href="http://rabbitbrush.frazmtn.com/aviation/sVFRFlightLog.jar"
download="eager" main="false"/>
</resources>
<application-desc
main-class="com.knutejohnson.tools.aviation.vfrlog.VFRFlightLog"/>
</jnlp> ]
at com.sun.javaws.Launcher.handleLaunchFile(Launcher.java:210)
at com.sun.javaws.Launcher.run(Launcher.java:165)
at java.lang.Thread.run(Thread.java:613)


--
John B. Matthews
trashgod at gmail dot com
home dot woh dot rr dot com slash jbmatthews
 
Andrew Thompson





PostPosted: 2008-3-23 10:13:00 Top

java-programmer >> JWS Program problem with MAC On Mar 23, 12:26爌m, "John B. Matthews" <email***@***.com> wrote:
> In article <47e58b1b$0$1630$email***@***.com>,
> 燢nute Johnson <email***@***.com> wrote:
...
> No JRE version found in launch file for this system

I do not know if it is related, but just noticed
something odd in John's output.

Between your original JNLP file which states
a single Jar (presumably containing a main)..

> ??<jar href='sVFRFlightLog.jar' />

..and how the plug-in interprets that as..

> ??<jar
> href="http://rabbitbrush.frazmtn.com/aviation/sVFRFlightLog.jar"
> download="eager" main="false"/>

..main="false"? How did it conclude that?
The default is that the 'first listed' jar
should contain a main().

I cannot see how it would affect the launch,
but perhaps you should try explicitly stating
that the jar contains the main(). Note that I
cannot see *why* it would be necessary to
specify that - barring a bug in the plug-in.

Andrew T.
PhySci.org
 
John B. Matthews





PostPosted: 2008-3-24 0:48:00 Top

java-programmer >> JWS Program problem with MAC In article <47e5c198$0$1630$email***@***.com>,
Knute Johnson <email***@***.com> wrote:

> Andrew Thompson wrote:
> > On Mar 23, 12:26 pm, "John B. Matthews" <email***@***.com> wrote:
> >> In article <47e58b1b$0$1630$email***@***.com>,
> >> Knute Johnson <email***@***.com> wrote:
> > ...
> >> No JRE version found in launch file for this system
> >
> > I do not know if it is related, but just noticed
> > something odd in John's output.
> >
> > Between your original JNLP file which states
> > a single Jar (presumably containing a main)..
> >
> >> <jar href='sVFRFlightLog.jar' />
> >
> > ..and how the plug-in interprets that as..
> >
> >> <jar
> >> href="http://rabbitbrush.frazmtn.com/aviation/sVFRFlightLog.jar"
> >> download="eager" main="false"/>
> >
> > ..main="false"? How did it conclude that?
> > The default is that the 'first listed' jar
> > should contain a main().
> >
> > I cannot see how it would affect the launch,
> > but perhaps you should try explicitly stating
> > that the jar contains the main(). Note that I
> > cannot see *why* it would be necessary to
> > specify that - barring a bug in the plug-in.
> >
> > --
> > Andrew T.
> > PhySci.org
>
> Thanks guys. I'm pretty sure this must be the problem that my friend
> was running into trying to run the program.
>
> I added a main= to the <jar> element. Please try it again and see if it
> has the same problems.

That fixed it!

John
--
John B. Matthews
trashgod at gmail dot com
home dot woh dot rr dot com slash jbmatthews
 
 
Roedy Green





PostPosted: 2008-3-24 3:26:00 Top

java-programmer >> JWS Program problem with MAC On Sat, 22 Mar 2008 15:41:30 -0700, Knute Johnson
<email***@***.com> wrote, quoted or indirectly quoted
someone who said :

>http://rabbitbrush.frazmtn.com/aviation/

try removing main="true" from:

<jar href="sVFRFlightLog.jar" main="true" />

You specified the main class explicitly.

also try changing:
<jnlp spec="1.0+"
to <jnlp spec="1.5+"

You are using 1.5 features.
--

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
 
 
Andrew Thompson





PostPosted: 2008-3-24 10:44:00 Top

java-programmer >> JWS Program problem with MAC On Mar 24, 11:25燼m, Knute Johnson <email***@***.com>
wrote:
...
> Do you know what features I was using of the JNLP spec that required 1.5?

One way to check is to validate it against the 1.0 DTD.
<http://www.google.com/search?
as_q=jnlp&as_sitesearch=java.sun.com&as_filetype=dtd>

Andrew T.
PhySci.org
 
 
Roedy Green





PostPosted: 2008-3-24 14:31:00 Top

java-programmer >> JWS Program problem with MAC On Sun, 23 Mar 2008 17:25:34 -0700, Knute Johnson
<email***@***.com> wrote, quoted or indirectly quoted
someone who said :

>Do you know what features I was using of the JNLP spec that required 1.5?

I don't think splash existed in the original spec, neither
main="true".
--

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
 
 
Roedy Green





PostPosted: 2008-3-24 20:22:00 Top

java-programmer >> JWS Program problem with MAC On Sat, 22 Mar 2008 21:26:06 -0400, "John B. Matthews"
<email***@***.com> wrote, quoted or indirectly quoted someone who
said :

>Here's the diagnostic info from a failed run on Mac OS 10.4.11 (ppc),
>java version 1.5.0_13:

I get that ALL the time with every JNLP app I try to launch from the
desktop shortcut on my PC. I can get it to work by launching from
inside the browser or from creating my own shortcut with the JNLP file
or JNLP URL.
--

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
 
 
John B. Matthews





PostPosted: 2008-3-24 22:51:00 Top

java-programmer >> JWS Program problem with MAC In article <47e6f4fe$0$1630$email***@***.com>,
Knute Johnson <email***@***.com> wrote:

> Roedy Green wrote:
> > On Sat, 22 Mar 2008 15:41:30 -0700, Knute Johnson
> > <email***@***.com> wrote, quoted or indirectly quoted
> > someone who said :
> >
> >> http://rabbitbrush.frazmtn.com/aviation/
> >
> > try removing main="true" from:
> >
> > <jar href="sVFRFlightLog.jar" main="true" />
> >
> > You specified the main class explicitly.
> >
> > also try changing:
> > <jnlp spec="1.0+"
> > to <jnlp spec="1.5+"
> >
> > You are using 1.5 features.
>
> OK. It's now jnlp spec="1.5+" and the main="true" has been removed.
>
> Please try it again.

This new jnlp also runs correctly on Mac OS 10.4.11, Safari 3.1.

--
John B. Matthews
trashgod at gmail dot com
home dot woh dot rr dot com slash jbmatthews
 
 
Roedy Green





PostPosted: 2008-3-25 20:55:00 Top

java-programmer >> JWS Program problem with MAC On Mon, 24 Mar 2008 10:50:49 -0400, "John B. Matthews"
<email***@***.com> wrote, quoted or indirectly quoted someone who
said :

> http://rabbitbrush.frazmtn.com/aviation/
>> >

I can run it, but the desktop icon does not work. It says I don't have
Java installed.
--

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
 
 
Andrew Thompson





PostPosted: 2008-3-26 6:46:00 Top

java-programmer >> JWS Program problem with MAC On Mar 24, 1:41爌m, Knute Johnson <email***@***.com>
wrote:
> Andrew Thompson wrote:
..
> > One way to check is to validate ...
..
> How do do that?

See this post.
<http://groups.google.com.au/group/comp.lang.java.programmer/msg/
ce4940523b837d20>

Extra important since I noticed the order
of elements in that (original) JNLP makes
is utterly invalid.

Anything the plug-in does with an invalid
JNLP is largely random.

(Glad to hear it currently works on Mac., but
I expect it will break again with the next
version if still invalid.)

Andrew T.
PhySci.org
 
 
Lew





PostPosted: 2008-3-26 8:41:00 Top

java-programmer >> JWS Program problem with MAC Knute Johnson wrote:
> So the program blows up the 6.0 DTD but with the 1.5 I get the following
> message. I have absolutely no idea what it means. And speaking of
> that, what order must the elements be in? I really have no clue what I
> need to do here and I can't find anything that makes any sense.
>
> org.xml.sax.SAXParseException: The content of element type "jnlp" must
> match
> "(information+,security?,resources*,(application-desc|applet-desc|component-desc|in
> staller-desc))".

This message tells you that the 'security' tag, if present, must follow the
'information' tag(s).

> <?xml version="1.0" encoding="UTF-8" ?>
> <jnlp spec="1.5+"
> codebase="http://rabbitbrush.frazmtn.com/aviation"
> href="flightlog.jnlp">
> <information>
> <title>VFR Flight Log</title>
> <vendor>Knute Johnson Software</vendor>
> <homepage href="index.html"/>
> <icon kind="splash" href="catalina.jpg" />
> <offline-allowed/>
> </information>
> <resources>
> <j2se version="1.5+" />
> <jar href="sVFRFlightLog.jar" />
> </resources>
> <application-desc
> main-class="com.knutejohnson.tools.aviation.vfrlog.VFRFlightLog">
> </application-desc>
> <security>
> <all-permissions/>
> </security>
> </jnlp>

Here your 'security' tag is way out of position. It is supposed to precede
the 'resources' tags.

--
Lew
 
 
Andrew Thompson





PostPosted: 2008-3-26 15:49:00 Top

java-programmer >> JWS Program problem with MAC On Mar 26, 11:54燼m, Knute Johnson <email***@***.com>
wrote:
...
> ...I never would have figured that out, I thought XML tags
> were not ordered.

'Right there with you'. I also thought XML
elements had 'no order' until I tried validating
them against a DTD. Just about every JNLP file
I'd written was invalid, that they (ever, on
any machine) worked was 'pure luck'.

Andrew T.
PhySci.org
 
 
Roedy Green





PostPosted: 2008-3-26 18:20:00 Top

java-programmer >> JWS Program problem with MAC On Tue, 25 Mar 2008 16:39:01 -0700, Knute Johnson
<email***@***.com> wrote, quoted or indirectly quoted
someone who said :

><jnlp spec="1.5+"
> codebase="http://rabbitbrush.frazmtn.com/aviation"
> href="flightlog.jnlp">

looks fine to me. Is that the DTD for 1.5?


--

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
 
 
Roedy Green





PostPosted: 2008-3-26 18:22:00 Top

java-programmer >> JWS Program problem with MAC On Tue, 25 Mar 2008 20:40:34 -0400, Lew <email***@***.com> wrote,
quoted or indirectly quoted someone who said :

>Here your 'security' tag is way out of position. It is supposed to precede
>the 'resources' tags.

Is that not the point of XML that all those fluffy tags mean order is
not supposed to matter?
--

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
 
 
Roedy Green





PostPosted: 2008-3-26 18:24:00 Top

java-programmer >> JWS Program problem with MAC On Tue, 25 Mar 2008 09:13:09 -0700, Knute Johnson
<email***@***.com> wrote, quoted or indirectly quoted
someone who said :

>> I can run it, but the desktop icon does not work. It says I don't have
>> Java installed.
>
>What kind of a MAC do you have Roedy?
this is on a Vista PC.

IT is not just your app that does this.

It is the most peculiar thing.

the system32 javaws does not launch desktop shortcuts properly.

BUT if you launch it, with -viewer, it will happily work.

Also the shortcuts modified to use C:\program
files\java\jre1.6.0_05\bin\javaws.exe also work.
--

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
 
 
Lew





PostPosted: 2008-3-26 20:06:00 Top

java-programmer >> JWS Program problem with MAC Roedy Green wrote:
> On Tue, 25 Mar 2008 20:40:34 -0400, Lew <email***@***.com> wrote,
> quoted or indirectly quoted someone who said :
>
>> Here your 'security' tag is way out of position. It is supposed to precede
>> the 'resources' tags.
>
> Is that not the point of XML that all those fluffy tags mean order is
> not supposed to matter?

No.

--
Lew
 
 
Roedy Green





PostPosted: 2008-3-27 3:53:00 Top

java-programmer >> JWS Program problem with MAC On Wed, 26 Mar 2008 10:24:17 GMT, Roedy Green
<email***@***.com> wrote, quoted or indirectly quoted
someone who said :

>the system32 javaws does not launch desktop shortcuts properly.

However, I found something even stranger. If I run the system32
javaws -viewer

I can create shortcuts that work.

The one thing that might explain my troubles is I did a "run as
administrator" during the install to avoid having to click ok to
access some file over and over.
--

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
 
 
Mark Space





PostPosted: 2008-3-27 6:55:00 Top

java-programmer >> JWS Program problem with MAC Roedy Green wrote:
> On Tue, 25 Mar 2008 20:40:34 -0400, Lew <email***@***.com> wrote,
> quoted or indirectly quoted someone who said :
>
>> Here your 'security' tag is way out of position. It is supposed to precede
>> the 'resources' tags.
>
> Is that not the point of XML that all those fluffy tags mean order is
> not supposed to matter?

I did some searching, I found this interesting:

<http://www-128.ibm.com/developerworks/xml/library/x-eleord.html>

Some learnings there for me too.

 
 
Andrew Thompson





PostPosted: 2008-3-27 7:02:00 Top

java-programmer >> JWS Program problem with MAC On Mar 27, 1:14燼m, Knute Johnson <email***@***.com>
wrote:
...
(please consider trimming)

> Where can I find the 1.0 DTD. 營 found the 1.5 and 6.0.

Huhh. I am sure when I first checked
that search URL it was showing a whole
lot more hits, but at the moment it is
just the two. This is not that surprising -
if you use the big G to search JNLP files
on the net, the figures will grow and shrink
by thousands each other week.

I'll let you know if I turn up an URL for
the 1.0 JNLP. It is probably included with
the JNLP 1.0.1 Spec* (but I could not be
bothered downloading it to check).

*
<http://java.sun.com/products/javawebstart/download-spec.html>

Andrew T.
PhySci.org
 
 
Andrew Thompson





PostPosted: 2008-3-28 15:38:00 Top

java-programmer >> JWS Program problem with MAC On Mar 27, 10:52燼m, Knute Johnson <email***@***.com>
wrote:
> Andrew Thompson wrote:
> > On Mar 27, 1:14 am, Knute Johnson <email***@***.com>
> > wrote:
> > ...
> > (please consider trimming)
..
> ...do I need a DOCTYPE statement for JNLP files?

Errr. I'm gonna' pass that one on to Ms. DTD
to answer. (Don't forget that you're talking
to someone who thought XML elements could be
'any order' - until I tried validating them!)

On a side note. Roedy is running a thread on
c.l.j.programmer in which I seem to recall him
saying he now has valid JNLP DTD (or maybe it
was just) XSD for 1.0, 1.5 & 1.6.

I *prefer* validating against XSD, since it
seems to offer more tests. OTOH, Piotr assures
me there are things that can be specified in
DTDs for which there is no equivalent in XSD.

Andrew T.
PhySci.org