Java Forum / First Aid / March 2008
JWS Program problem with MAC
Knute Johnson - 22 Mar 2008 23:41 GMT My friend has a MAC laptop with OS 10.5? and can't seem to load one of my JWS programs. He says that he has Java Web Start 1.5 and I've run the .jar file on his computer when I was in front of it once. My JWS program is compiled for 1.5 and should work. Could somebody with a MAC and OS 10.5 try it for me and see if there are problems? It is in a signed jar and I promise that it is not harmful. It is signed so that it can do local file I/O. The unsigned jar is there as well as the source code.
http://rabbitbrush.frazmtn.com/aviation/
Click on the 'VFR Flight Log' link in the first line.
Thanks very much,
 Signature Knute Johnson email s/nospam/linux/
John B. Matthews - 23 Mar 2008 02:26 GMT > 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)
 Signature John B. Matthews trashgod at gmail dot com home dot woh dot rr dot com slash jbmatthews
Andrew Thompson - 23 Mar 2008 03:13 GMT > In article <47e58b1b$0$1630$b9f67...@news.newsdemon.com>, ...
> 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
Knute Johnson - 23 Mar 2008 07:30 GMT >> In article <47e58b1b$0$1630$b9f67...@news.newsdemon.com>, > ... [quoted text clipped - 27 lines] > 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.
 Signature Knute Johnson email s/nospam/linux/
John B. Matthews - 23 Mar 2008 17:48 GMT > >> In article <47e58b1b$0$1630$b9f67...@news.newsdemon.com>, > > ... [quoted text clipped - 33 lines] > I added a main= to the <jar> element. Please try it again and see if it > has the same problems. That fixed it!
John
 Signature John B. Matthews trashgod at gmail dot com home dot woh dot rr dot com slash jbmatthews
Roedy Green - 24 Mar 2008 13:21 GMT On Sat, 22 Mar 2008 21:26:06 -0400, "John B. Matthews" <nospam@nospam.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.
 Signature
Roedy Green Canadian Mind Products The Java Glossary http://mindprod.com
Roedy Green - 23 Mar 2008 20:25 GMT On Sat, 22 Mar 2008 15:41:30 -0700, Knute Johnson <nospam@rabbitbrush.frazmtn.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.
 Signature
Roedy Green Canadian Mind Products The Java Glossary http://mindprod.com
Knute Johnson - 24 Mar 2008 01:25 GMT > On Sat, 22 Mar 2008 15:41:30 -0700, Knute Johnson > <nospam@rabbitbrush.frazmtn.com> wrote, quoted or indirectly quoted [quoted text clipped - 13 lines] > > 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.
Do you know what features I was using of the JNLP spec that required 1.5?
Thanks,
 Signature Knute Johnson email s/nospam/linux/
Andrew Thompson - 24 Mar 2008 03:44 GMT On Mar 24, 11:25 am, Knute Johnson <nos...@rabbitbrush.frazmtn.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
Knute Johnson - 24 Mar 2008 04:41 GMT > On Mar 24, 11:25 am, Knute Johnson <nos...@rabbitbrush.frazmtn.com> > wrote: [quoted text clipped - 8 lines] > Andrew T. > PhySci.org How do do that?
 Signature Knute Johnson email s/nospam/linux/
------->>>>>>http://www.NewsDem
Andrew Thompson - 25 Mar 2008 23:46 GMT On Mar 24, 1:41 pm, Knute Johnson <nos...@rabbitbrush.frazmtn.com> 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
Knute Johnson - 26 Mar 2008 00:39 GMT > On Mar 24, 1:41 pm, Knute Johnson <nos...@rabbitbrush.frazmtn.com> > wrote: [quoted text clipped - 21 lines] > Andrew T. > PhySci.org 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))".
<?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>
Thanks,
 Signature Knute Johnson email s/nospam/linux/
------->>>>>>http://www.NewsDem
Lew - 26 Mar 2008 01:40 GMT > 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 [quoted text clipped - 5 lines] > "(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+" [quoted text clipped - 18 lines] > </security> > </jnlp> Here your 'security' tag is way out of position. It is supposed to precede the 'resources' tags.
 Signature Lew
Knute Johnson - 26 Mar 2008 01:54 GMT >> 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 [quoted text clipped - 35 lines] > Here your 'security' tag is way out of position. It is supposed to > precede the 'resources' tags. Thanks Lew. I never would have figured that out, I thought XML tags were not ordered.
 Signature Knute Johnson email s/nospam/linux/
------->>>>>>http://www.NewsDem
Andrew Thompson - 26 Mar 2008 08:48 GMT On Mar 26, 11:54 am, Knute Johnson <nos...@rabbitbrush.frazmtn.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
Knute Johnson - 26 Mar 2008 16:14 GMT > On Mar 26, 11:54 am, Knute Johnson <nos...@rabbitbrush.frazmtn.com> > wrote: [quoted text clipped - 11 lines] > Andrew T. > PhySci.org Where can I find the 1.0 DTD. I found the 1.5 and 6.0.
Thanks,
 Signature Knute Johnson email s/nospam/linux/
Andrew Thompson - 27 Mar 2008 00:02 GMT On Mar 27, 1:14 am, Knute Johnson <nos...@rabbitbrush.frazmtn.com> wrote: ... (please consider trimming)
> Where can I find the 1.0 DTD. I 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
Knute Johnson - 27 Mar 2008 00:47 GMT > On Mar 27, 1:14 am, Knute Johnson <nos...@rabbitbrush.frazmtn.com> > wrote: [quoted text clipped - 18 lines] > * > <http://java.sun.com/products/javawebstart/download-spec.html> I found that page a couple of days ago and yesterday I couldn't find it for the life of me. It's bookmarked now. The DTD is in there but it would have to be edited to take out the footers. If I don't find the file someplace and I can get up the energy I'll do that.
Thanks,
 Signature Knute Johnson email s/nospam/linux/
Knute Johnson - 27 Mar 2008 00:52 GMT > On Mar 27, 1:14 am, Knute Johnson <nos...@rabbitbrush.frazmtn.com> > wrote: [quoted text clipped - 22 lines] > Andrew T. > PhySci.org One more question, do I need a DOCTYPE statement for JNLP files?
 Signature Knute Johnson email s/nospam/linux/
Andrew Thompson - 28 Mar 2008 08:37 GMT On Mar 27, 10:52 am, Knute Johnson <nos...@rabbitbrush.frazmtn.com> wrote:
> > On Mar 27, 1:14 am, Knute Johnson <nos...@rabbitbrush.frazmtn.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
Roedy Green - 26 Mar 2008 11:21 GMT >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?
 Signature
Roedy Green Canadian Mind Products The Java Glossary http://mindprod.com
Lew - 26 Mar 2008 13:05 GMT >> 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.
 Signature Lew
Mark Space - 26 Mar 2008 23:55 GMT >> 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.
Roedy Green - 26 Mar 2008 11:20 GMT On Tue, 25 Mar 2008 16:39:01 -0700, Knute Johnson <nospam@rabbitbrush.frazmtn.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?
 Signature Roedy Green Canadian Mind Products The Java Glossary http://mindprod.com
Knute Johnson - 26 Mar 2008 16:10 GMT > On Tue, 25 Mar 2008 16:39:01 -0700, Knute Johnson > <nospam@rabbitbrush.frazmtn.com> wrote, quoted or indirectly quoted [quoted text clipped - 5 lines] > > looks fine to me. Is that the DTD for 1.5? Yes 1.5. I guess I have to go back and check all of my jnlp files.
 Signature Knute Johnson email s/nospam/linux/
Roedy Green - 24 Mar 2008 07:30 GMT On Sun, 23 Mar 2008 17:25:34 -0700, Knute Johnson <nospam@rabbitbrush.frazmtn.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".
 Signature
Roedy Green Canadian Mind Products The Java Glossary http://mindprod.com
John B. Matthews - 24 Mar 2008 15:50 GMT > > On Sat, 22 Mar 2008 15:41:30 -0700, Knute Johnson > > <nospam@rabbitbrush.frazmtn.com> wrote, quoted or indirectly quoted [quoted text clipped - 17 lines] > > Please try it again. This new jnlp also runs correctly on Mac OS 10.4.11, Safari 3.1.
 Signature John B. Matthews trashgod at gmail dot com home dot woh dot rr dot com slash jbmatthews
Knute Johnson - 24 Mar 2008 16:59 GMT >>> On Sat, 22 Mar 2008 15:41:30 -0700, Knute Johnson >>> <nospam@rabbitbrush.frazmtn.com> wrote, quoted or indirectly quoted [quoted text clipped - 17 lines] > > This new jnlp also runs correctly on Mac OS 10.4.11, Safari 3.1. Thanks very much guys.
 Signature Knute Johnson email s/nospam/linux/
Roedy Green - 25 Mar 2008 13:55 GMT On Mon, 24 Mar 2008 10:50:49 -0400, "John B. Matthews" <nospam@nospam.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.
 Signature
Roedy Green Canadian Mind Products The Java Glossary http://mindprod.com
Knute Johnson - 25 Mar 2008 17:13 GMT > On Mon, 24 Mar 2008 10:50:49 -0400, "John B. Matthews" > <nospam@nospam.com> wrote, quoted or indirectly quoted someone who [quoted text clipped - 4 lines] > 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?
 Signature Knute Johnson email s/nospam/linux/
Roedy Green - 26 Mar 2008 11:24 GMT On Tue, 25 Mar 2008 09:13:09 -0700, Knute Johnson <nospam@rabbitbrush.frazmtn.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.
 Signature
Roedy Green Canadian Mind Products The Java Glossary http://mindprod.com
Knute Johnson - 26 Mar 2008 16:12 GMT > On Tue, 25 Mar 2008 09:13:09 -0700, Knute Johnson > <nospam@rabbitbrush.frazmtn.com> wrote, quoted or indirectly quoted [quoted text clipped - 15 lines] > Also the shortcuts modified to use C:\program > files\java\jre1.6.0_05\bin\javaws.exe also work. This is fun isn't it? Another whole layer of undocumented cryptic instructions.
 Signature Knute Johnson email s/nospam/linux/
Roedy Green - 26 Mar 2008 20:52 GMT On Wed, 26 Mar 2008 10:24:17 GMT, Roedy Green <see_website@mindprod.com.invalid> 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.
 Signature
Roedy Green Canadian Mind Products The Java Glossary http://mindprod.com
Free MagazinesGet 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 ...
|
|
|