Launching Java Web Start from a CD


R

Roedy Green

I would like to be able to launch my Java webstart app also from CD.

I have been fooling around with various JNLP files, to no avail. They
die with "unexpected error 4" whatever that means.

If I ever get that going, I wonder if anyone has ever managed to get
the autorun.inf thing to launch a JNLP.


Here is what I have been attempting.

Get the user to type R: or whatever the CD is called and then type
replicatorreceivercd.jnlp


<?xml version="1.0" encoding="utf-8"?>

<jnlp spec="1.0+" codebase="file://localhost"
href="replicatorreceivercd.jnlp">
<information>
<title>The Replicator 3.3 beta</title>

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

<description>Replicates files via CD. Also keeps them up to date
efficiently.</description>
<description kind="short">Replicates files via CD.</description>
<description kind="tooltip">the Replicator</description>
<icon href="replicator.gif" width="64" height="64" />

</information>

<resources>
<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="replicatorreceiver.jar" />
<!-- set -D system properties -->
<property name="VIA" value="cd" />
<property name="PROJECT_NAME" value="Mindprod.com Website" />
<property name="UNIQUE_PROJECT_NAME"
value="com.mindprod.replicator" />
<property name="SUGGESTED_RECEIVER_BASE_DIR" value="c:\mp" />
<property name="SUGGESTED_RECEIVER_ZIP_STAGING_DIR"
value="c:\mpstaging" />
<property name="WEBSITE_ZIP_URL"
value="http://mindprod.com/replicator" />
<property name="SUGGESTED_LAN_ZIP_URL" value="file://localhost" />
<property name="KEEP_ZIPS" value="false"/>
<property name="UNPACK_ZIPS" value="true" />
<property name="AUTHENTICATION" value="none" />
</resources>

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

<!-- application class with main method -->
<application-desc
main-class="com.mindprod.replicator.AskReceiverConfig" />

</jnlp>
 
Ad

Advertisements

R

Roedy Green

I have been fooling around with various JNLP files, to no avail. They
die with "unexpected error 4" whatever that means.

Launching JWS apps from a CD

This I have not yet figured out how to do this. How can you know ahead
of time what the URL of the CD drive is to put in the JNLP file? JWS
does not seem to support . or file://localhost. The FAQ says that the
codebase cannot be relative. I have seen suggestions you need to write
an installer program that patches the jnlp file with the correct URL
and copies everything on the CD to disk. You could use a codebase of
codebase="file://localhost/R:" and just tell your clients to configure
their CDROM drives as R:, not very polite! To change the CD drive
letter, the client would have to modify the jnlp file and burn a new
CD. Ouch! The Vamphq people have a complicated way around it, adding a
miniature webserver to your distribution CD that dynamically patches
the JNLP file on the fly when Javaws reads it.

The proper solution is for Sun to support codebase="cd".
 
Ad

Advertisements

D

Dale King

Roedy Green said:
Launching JWS apps from a CD

This I have not yet figured out how to do this. How can you know ahead
of time what the URL of the CD drive is to put in the JNLP file? JWS
does not seem to support . or file://localhost. The FAQ says that the
codebase cannot be relative. I have seen suggestions you need to write
an installer program that patches the jnlp file with the correct URL
and copies everything on the CD to disk. You could use a codebase of
codebase="file://localhost/R:" and just tell your clients to configure
their CDROM drives as R:, not very polite! To change the CD drive
letter, the client would have to modify the jnlp file and burn a new
CD. Ouch! The Vamphq people have a complicated way around it, adding a
miniature webserver to your distribution CD that dynamically patches
the JNLP file on the fly when Javaws reads it.

The proper solution is for Sun to support codebase="cd".


This is going to be changed in 1.5. See these slides, in particular the
import option.

http://servlet.java.sun.com/javaone/sf2003/conf/sessions/display-1486.en.jsp
 

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

Top