For Programmers: Free Programming Magazines  


Home > Archive > Java Help > May 2004 > Run applet from a CD









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Run applet from a CD
Ray Joslyn

2004-05-13, 5:32 pm

I'm trying to get an applet to run off a CD with appletviewer. I want
this to be self contained so that the end user does not have to
install anything. Is this even possible. I've tried copying all the
files from the bin directory of my java sdk directory to the directory
where the applet is going to run, but I get a message back when I try
to run it saying "could not find java.dll" and cound not find java 2
runtime environment.

Ray
Roedy Green

2004-05-13, 5:32 pm

On 13 May 2004 13:42:35 -0700, rjoslyn@etg-i.com (Ray Joslyn) wrote
or quoted :

>I'm trying to get an applet to run off a CD with appletviewer. I want
>this to be self contained so that the end user does not have to
>install anything. Is this even possible. I've tried copying all the
>files from the bin directory of my java sdk directory to the directory
>where the applet is going to run, but I get a message back when I try
>to run it saying "could not find java.dll" and cound not find java 2
>runtime environment.


I have invented a scheme for self-installing JWS applications from CD.

It uses a tiny bit of C code invoked by the autorun.inf to select one
of 26 automatically generated variants of the JNLP file.

I use it in The Replicator. See
http://mindprod.com/products.html#REPLICATOR



You can make Applets run as standalone applications fairly easily as
well. see http://mindprod.com/jgloss/applet.html

Then your program reduces to using an application installer. see
http://mindprod.com/jgloss/installer.html


--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
Ray Joslyn

2004-05-14, 10:32 am

Roedy Green <look-on@mindprod.com.invalid> wrote in message news:<i0o7a0lprb9orph9a0q14hbhb0dve3m7lj@4ax.com>...
> On 13 May 2004 13:42:35 -0700, rjoslyn@etg-i.com (Ray Joslyn) wrote
> or quoted :
>
>
> I have invented a scheme for self-installing JWS applications from CD.
>
> It uses a tiny bit of C code invoked by the autorun.inf to select one
> of 26 automatically generated variants of the JNLP file.
>
> I use it in The Replicator. See
> http://mindprod.com/products.html#REPLICATOR
>
>
>
> You can make Applets run as standalone applications fairly easily as
> well. see http://mindprod.com/jgloss/applet.html
>
> Then your program reduces to using an application installer. see
> http://mindprod.com/jgloss/installer.html


I looks like I would need to use a java web start application, is this
correct? Also would I be able to start an external program through a
web start app?

Ray
Andrew Thompson

2004-05-14, 11:32 am

On 14 May 2004 06:58:36 -0700, Ray Joslyn wrote:

> Roedy Green <look-on@mindprod.com.invalid> wrote in message news:...
...[color=darkred]
....[color=darkred]
> I looks like I would need to use a java web start application, is this
> correct?


There are two options (as I see it) to
deliver an aplication to a customer
via CD.

1) Provide the JRE, then link to the Jar file.

2) Provide the JRE, then use JWS to install it.

>..Also would I be able to start an external program through a
> web start app?


If you can do it from an application/or
local applet, yes.

Applet premissions can be configured during JWS
install, but you would have to do it manually for
non-JWS applets.

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
Québec

2004-05-14, 12:32 pm

[color=darkred]

Why a C file?
Is it not platform dependant?


Roedy Green

2004-05-14, 1:32 pm

On 14 May 2004 06:58:36 -0700, rjoslyn@etg-i.com (Ray Joslyn) wrote
or quoted :

>I looks like I would need to use a java web start application, is this
>correct?


That's the easiest way. I did an Applet-style one click install too,
using a signed applet. The problem with Applets is you have to find
your own disk space for everything. With JWS, it will allocate you
some and put the DLLs, and files there.

> Also would I be able to start an external program through a
>web start app?


Yes, once you sign the Applet you can do anything an ordinary app can.

In fact a JWS program can be a perfectly unmodified ordinary app. All
you do is add a *.jnlp file to control its auto-installation.

This is one of the things I like about JWS. You can write one program
an run it as Applet, as stand-alone or as JWS with only the tiniest
bit of extra code.

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
Roedy Green

2004-05-14, 1:32 pm

On Fri, 14 May 2004 11:14:06 -0400, "Québec" <notAgain@enough.ca>
wrote or quoted :

>Why a C file?
>Is it not platform dependant?


Yes.

part of the problem is the JNLP file must have an ABSOLUTE reference
to the CD file. The way you specify the CD drive is different on every
platform. In fact I had to create 26 variants of the JNLP file to
cover the possible drive letters they might use. I needed something
to file it off. I had a chicken-egg problem, so I wrote a tiny bit of
C to figure out which drive the CD was and select the right JNLP file
for kickoff.

Sun needs to invent something in JNLP to allow CD installs where you
just specify the JNLP file is "on CD". Then the CD would be platform
independent.

Even then, there is no platform independent autorun.

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
Andrew Thompson

2004-05-14, 1:32 pm

On Fri, 14 May 2004 16:41:42 GMT, Roedy Green wrote:

> Sun needs to invent something in JNLP to allow CD installs where you
> just specify the JNLP file is "on CD".


Which CD drive though?

I have a DVD that reads CD's,
and a separate CD R/RW.

...I was musing once if the 'volume name'
of the CD might be better, but that turned
out to be a non-starter for some reason
I cannot recall.

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
Roedy Green

2004-05-14, 2:32 pm

On Fri, 14 May 2004 16:38:11 GMT, Roedy Green
<look-on@mindprod.com.invalid> wrote or quoted :

>Yes, once you sign the Applet you can do anything an ordinary app can.

oops. Once you sign the Weblet (JWS application) you can do anything
an ordinary app can.

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
Roedy Green

2004-05-14, 2:32 pm

On Fri, 14 May 2004 16:50:35 GMT, Andrew Thompson
<SeeMySites@www.invalid> wrote or quoted :

>
>Which CD drive though?


It would work like this:

In windows it would have an autorun.

It would also let you select the CD as the current drive and click
"setup". This would be a jnlp file or similar that would be associated
with javaws, pre-installed.

Javaws would then figure out for itself which CD was being used.

This install would work on any OS that could associate *.JNLP files
with JWS. For others, you could feed the name of that JNLP file on
the CD to JWS.

Normally a JNLP file points to another master JNLP file to get the
latest and greatest. There needs to be a way to say "the master JNLP
file is the same JNLP file on the CD from which you started this JNLP
file" or perhaps, "the JNLP file in on CD -- ask the user which if
there are more than one, or look and only ask if you see duplicates."


--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
Roedy Green

2004-05-14, 2:32 pm

On Fri, 14 May 2004 16:50:35 GMT, Andrew Thompson
<SeeMySites@www.invalid> wrote or quoted :

>..I was musing once if the 'volume name'
>of the CD might be better, but that turned
>out to be a non-starter for some reason
>I cannot recall.


I researched this when I was implementing CD installs for the
Replicator. The thing I needed was high confidentiality. Some clients
are on machines isolated from the net. They only communicate with the
outside world via CDs burned on machines with access to the net.

I was amazed at the ingenuity of hokey schemes people came up with to
get around the problem. All of them are disgusting, but no one has
found a clean way to do it. I consider fixing this the #1 outstanding
problem with Java Web Start. It will allow one click install, self
updating, shrink wrap, multi-platform apps.


see http://mindprod.com/jgloss/javawebstart.html#CD

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com