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 / October 2005

Tip: Looking for answers? Try searching our database.

JAWS shortcut failure

Thread view: 
Roedy Green - 19 Oct 2005 14:01 GMT
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?
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.

Andrew Thompson - 19 Oct 2005 14:52 GMT
> 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
Roedy Green - 19 Oct 2005 22:14 GMT
>I think it is mostly caching at your PC.
>Have a look at it (seemingly) working here..
><http://www.physci.org/test/screenshot/mp/>

I did get that far too. I can launch the app, which is a prototype of
a present for a friend of mine in England who wanted something to
present affirmations, with http://mindprod.com/webtarts/affirm.jnlp

However, the menu and desktop  links it creates don't work.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.

Andrew Thompson - 20 Oct 2005 06:45 GMT
..
>  > Has anyone else had success/failure with JDK 1.5.05 and JAWS
>  > shortcuts?

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.
Roedy Green - 20 Oct 2005 08:52 GMT
><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.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.

Andrew Thompson - 20 Oct 2005 09:11 GMT
> 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.
Roedy Green - 20 Oct 2005 11:24 GMT
>* 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.

I wrote a little JNLP verifier using the Vampqh XSD schema. It thinks
my JNLP is fine too.

You can see it at:
http://mindprod.com/jgloss/javawebstart.html#VALIDATION
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.

Roedy Green - 20 Oct 2005 08:53 GMT
>The direct URL is
><http://www.javasaver.com/testjs/jws/03/bouncingline.jnlp>

this works fine. Your server is delivering the proper JNLP mime type.
I checked at http://mindprod.com/applets/mimecheck.html
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.

Andrew Thompson - 20 Oct 2005 09:11 GMT
>>The direct URL is
>><http://www.javasaver.com/testjs/jws/03/bouncingline.jnlp>
>
> this works fine. Your server is delivering the proper JNLP mime type.
> I checked at http://mindprod.com/applets/mimecheck.html

I am unclear whether 'this works fine' refers to..
- The mime-type returned for JNLP's on my site
- Bouncing Line icons and menus

Could you clarify?
Roedy Green - 20 Oct 2005 09:46 GMT
>I am unclear whether 'this works fine' refers to..
>- The mime-type returned for JNLP's on my site
>- Bouncing Line icons and menus

both are fine.

Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.

Roedy Green - 19 Oct 2005 23:19 GMT
>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.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.

Andrew Thompson - 20 Oct 2005 05:08 GMT
>>I used the new stuff in JAWS 1.5 to hint to set up shortcuts.
>>I can't get it to work.

I just *uninstalled* Living Love so that I could try it
again (I made some dumb choices to not have menus icons
the first time - D'oh!).

Now I get an error..

"An error occurred while launching/running the application.

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

Corrupted JAR file at http://www.mindprod.com/webstarts/affirm.jar"

Could you fix that?  I'll try it again when you do.
Roedy Green - 20 Oct 2005 08:53 GMT
>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.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.

Andrew Thompson - 20 Oct 2005 09:18 GMT
>>Title: Affirm 1.2: Living love affirmations
>>Vendor: Canadian Mind Products
[quoted text clipped - 3 lines]
> 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)
  - ....
Roedy Green - 20 Oct 2005 09:48 GMT
>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.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.

Roedy Green - 20 Oct 2005 01:01 GMT
>I used the new stuff in JAWS 1.5 to hint to set up shortcuts.
>
>I can't get it to work.

I thought perhaps the problem was some associations were screwed up. I
checked out *.jnlp and *.jar and they were as expected to the JRE of
Java 1.5.0_05.

Then I thought I would some other JAWS app could build shortcuts.
Setclock worked fine, even without explicit hints in the JNLP.

I noted that shortcut hooked Javaws to a JNLP file in the deployment
area.  It was not empty like the one for Affirm.

I now suspect the problem may be related to the fact that affirm was
not signed where my other Jaws apps are.  Experiments are on hold due
to a locked file on my server.

Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.



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



©2009 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.