JAWS shortcut failure

R

Roedy Green

I used the new stuff in JAWS 1.5 to hint to set up shortcuts.

I can't get it to work.


The launch icon is on the desktop, but with the wrong gif (a generic
one, not my app icon). When I click it I get this message:

An error occurred while launching/running the application.

Category: Launch File Error

Could not parse launch file. Error at line 0.


JNLParseException[ Could not parse launch file. Error at line 0.]
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.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
at com.sun.javaws.Main.launchApp(Unknown Source)
at com.sun.javaws.Main.main(Unknown Source)


This is my JNLP file:
<?xml version="1.0" encoding="utf-8"?>

<jnlp spec="1.5+" codebase="http://www.mindprod.com/webstarts"
href="affirm.jnlp">
<information>
<title>Affirm 1.1: Living love affirmations</title>

<vendor>Canadian Mind Products</vendor>
<homepage href="http://www.mindprod.com/" />

<description>Living love affirmations</description>
<description kind="short">Living love affirmations</description>
<description kind="tooltip">Affirm</description>
<icon href="http://www.mindprod.com/images/affirm.gif" width="32"
height="32" />
<offline-allowed/>
<!-- hints for setting up shortcuts, prefer a shortcut for offline
operation -->
<shortcut online="false">
<!-- create desktop shortcut -->
<desktop/>
<!-- create menu item Affirmations/Affirm 1.1 -->
<menu submenu="Affirmations"/>
</shortcut>

</information>

<resources>
<!-- Acceptable JVMs in preferred order, best first -->

<j2se version="1.5.0_05"
href="http://java.sun.com/products/autodl/j2se" />
<j2se version="1.5.0_04"
href="http://java.sun.com/products/autodl/j2se" />
<j2se version="1.5.0_03"
href="http://java.sun.com/products/autodl/j2se" />
<j2se version="1.5.0_02"
href="http://java.sun.com/products/autodl/j2se" />
<j2se version="1.5.0"
href="http://java.sun.com/products/autodl/j2se" />
<j2se version="1.4.2_09"
href="http://java.sun.com/products/autodl/j2se" />
<j2se version="1.4.2_08"
href="http://java.sun.com/products/autodl/j2se" />
<j2se version="1.4.2_07"
href="http://java.sun.com/products/autodl/j2se" />
<j2se version="1.4.2_06"
href="http://java.sun.com/products/autodl/j2se" />
<j2se version="1.4.2_05"
href="http://java.sun.com/products/autodl/j2se" />
<j2se version="1.4.2_04"
href="http://java.sun.com/products/autodl/j2se" />
<j2se version="1.4.2_03"
href="http://java.sun.com/products/autodl/j2se" />
<j2se version="1.4.2_02"
href="http://java.sun.com/products/autodl/j2se" />
<j2se version="1.4.2_01"
href="http://java.sun.com/products/autodl/j2se" />
<j2se version="1.4.2"
href="http://java.sun.com/products/autodl/j2se" />

<!-- application code -->
<jar href="affirm.jar" />
</resources>

<!-- application class with main method -->
<application-desc main-class="com.mindprod.affirm.Affirm">
<!-- command line arguments -->
<!-- minOn maxOn minOff maxOff in milliseconds -->
<argument>200</argument>
<argument>5000</argument>
<argument>2000</argument>
<argument>10000</argument>
</application-desc>

</jnlp>

Both the desktop shortcut and the menu item are 0 bytes long.

I previously tried setting up shortcuts using the Java control panel.
They were even worse. They did not even know javaws.exe was needed to
launch.

Has anyone else had success/failure with JDK 1.5.05 and JAWS
shortcuts?
 
A

Andrew Thompson

Roedy said:
I used the new stuff in JAWS 1.5 to hint to set up shortcuts.

I can't get it to work.

I think it is mostly caching at your PC.
Have a look at it (seemingly) working here..
<http://www.physci.org/test/screenshot/mp/>
It might be you told your JWS settings to 'never'
make the desktop/menu things, but forgot..

Suggestion: Try a system reboot, and/or a sleep.
(JWS can have that effect on you!)
Has anyone else had success/failure with JDK 1.5.05 and JAWS
shortcuts?

No, but I've been thinking of adding 'menu' suggestions
to the Saverbeans preview JNLP's. I'll get back to you
if I do that and find out anything more..


HTH
 
R

Roedy Green

I used the new stuff in JAWS 1.5 to hint to set up shortcuts.

I can't get it to work.

general background quoted from
http://mindprod.com/jgloss/javawebstart.html#SHORTCUTS

ShortCuts

You can configure JAWS in the Java control panel advanced how it
handles shortcuts — an optional desktop icon to launch, and an
optional menu item to launch your JAWS app. I am having trouble with
this feature in Java 1.5.0_05, which used to work fine. I have not yet
tracked down what the problem is. In theory, you should be able to put
hints in your JNLP file as to which shortcuts you want, and the user
can override those hints in the Java Control Panel to either always
make the shortcuts, always skip them or always ask. You hint in JNLP
with code like this in the <information> section:

<!-- hints for setting up shortcuts -->
<!-- Prefer a shortcut for online operation -->
<shortcut online="true">
<!-- create desktop shortcut -->
<desktop/>
<!-- create menu item for this app under the major heading Esperanto
-->
<menu submenu="Esperanto"/>
</shortcut>
In any case, you can safety delete desktop launch icons or menu items
if JAWS created them inappropriately. In theory, you can also install
or uninstall shortcuts with Start | Settings | Control Panel | Java |
General | Temporary Internet Files | Settings | User | Application |
right click | Install Shortcuts.

To bypass problems, you can also create your own shortcuts and menu
items manually. To do that, right click on the desktop | new |
shortcut. Then select the JRE javaws.exe as the launch program e.g.
"c:\Program Files\java\jre1.5.0_05\bin\javaws.exe". Then right click
the icon | properties and add the name of the URL after the name of
the javaws.exe launch program e.g.
"http://mindprod.com/webstarts/affirm.jnlp". Don't forget the quotes.
You can select a better icon, perhaps by looking in places like:
C:\Documents and Settings\Administrator.ROEDY\Application
Data\Sun\Java\Deployment\cache\javaws\http\Dwww.mindprod.com\P80\DMimages\RB
affirm.gif.ico

Then you can right click drag | copy that desktop icon wherever you
want onto your menu.
 
A

Andrew Thompson

Andrew said:
Roedy Green wrote: ...

Success on one PC.
No, but I've been thinking of adding 'menu' suggestions
to the Saverbeans preview JNLP's. I'll get back to you
if I do that and find out anything more..

<http://www.javasaver.com/testjs/jws/03/install.html>
Try the 'Bouncing Line' JWS link. You should be
prompted as to whether you want icons/menus.
I said 'OK' wheb asked and got them, here..

The direct URL is
<http://www.javasaver.com/testjs/jws/03/bouncingline.jnlp>
...but I am not sure if you can do a direct 'fetch' on it.

Note that all the ones marked 'JOGL' connect to that byte
bloated, CPU intensive API that was used for 'Golden Globe'
animation we discussed the other day. By contrast,
Bouncing Line is under 100Kb (and not v. CPU intensive).

I'll be interested to hear your (or anyone's) reports
on how Bouncing Line behaves.
 
R

Roedy Green

<http://www.javasaver.com/testjs/jws/03/install.html>
Try the 'Bouncing Line' JWS link. You should be
prompted as to whether you want icons/menus.
I said 'OK' wheb asked and got them, here..

Yours works fine, and does my SetClock. This means there is something
odd about affirm. I did a DIFF between my affirm JNLP and Setclock
JNLP and eliminated any differences that seemed relevant. Still no
joy.

I'm out to see if I can find some tool to validate my JNLP.

It is XML but has no DTD or XSD mentioned in the headers.
 
R

Roedy Green

Title: Affirm 1.2: Living love affirmations
Vendor: Canadian Mind Products
Category: Download Error

That is a separate problem, now fixed. I gather an FTP upload failed
leaving the jar at 0 bytes, and locked so I could not replace, delete
or rename it.
 
A

Andrew Thompson

Roedy said:
I'm out to see if I can find some tool to validate my JNLP.

I was gonna mention it before but decided not too*.

Sun *has* a DTD for JNLP files, but you need to download
the JNLP *Spec* to get it! It is 'Appendix C' AFAIR.

* I am positive your affirm.jnlp is correct, you must
have gotten a bad copy at some point during devlopment
and that is stuck somewhere in the JWS works.

Try using the Windows un-install and start again.
 
A

Andrew Thompson

Roedy said:
That is a separate problem, now fixed. I gather an FTP upload failed
leaving the jar at 0 bytes, and locked so I could not replace, delete
or rename it.

OK - I uninstalled it and tried again..

No icons. But I notice that now..
AaaaaargH! You have *changed* the .JNLP file!

How the heck are we supposed to track this down if
you keep changing the jar file and JNLP?!?
What's next?

If we need a 'new trial', you should instead
provide links to different JNLP files, (as in..)

links to JNLP test ..
- No. 1
- No. 2 (new jar)
- No. 3 (different attributes)
- ....
 
R

Roedy Green

No icons. But I notice that now..
AaaaaargH! You have *changed* the .JNLP file!

I was hoping for only an eyeball inspection of my JNLP file. If you
want to get your hands dirty, download the JNLP and jar and run it
locally to see if you can figure out what is about it that makes it
fail, or even IF it fails for you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top