
Signature
Knute Johnson
email s/nospam/knute/
Knute Johnson wrote on 01.01.2007 20:01:
> It would be really nice to be able to hand somebody a CD with your app
> and a JRE, have them stick it in their computer and get it to work. As
[quoted text clipped - 5 lines]
> to go system instead of installing all of the pieces and parts would be
> really nice.
Have a look at the link I posted:
http://launch4j.sourceforge.net/
>>>> In case of b): Forget it, simply add a Java
>>>> Runtime Environment to your project.
[quoted text clipped - 13 lines]
>
> Now the users other java stuff doesn't work correctly.
It will work just as it did before. I've done no installation with
global effects, I've just copied a folder. The java.exe in there
will not be used unless you explicitly call it.
> It would be really nice to be able to hand somebody a CD with your app
> and a JRE, have them stick it in their computer and get it to work.
I did it with an USB stick, but it was just that: stick, click, run (from
stick). If I didn't have to save some data, a CD would have worked just
as well.
> My software needs JAF,
> Java Mail and Java Comm APIs as well. To be able to distribute a ready
> to go system instead of installing all of the pieces and parts would be
> really nice.
I don't know if those things would require a more elaborate procedure,
but assuming that redistributing them is legally ok, it's probably just
a matter of placing them where your runtime can find them. Having not done
this, I could be wrong, however.
s.
Thomas Kellerer - 02 Jan 2007 16:28 GMT
>> Now the users other java stuff doesn't work correctly.
> It will work just as it did before. I've done no installation with
> global effects, I've just copied a folder. The java.exe in there
> will not be used unless you explicitly call it.
Depends on how you changed the variable JAVA_HOME. If you set it in the
batch file, it will only affect the process started by the batch file.
To be sure to avoid side-effects, you should use setlocal inside the
batch file, so the SET will only have an effect during the runtime of
the batch file. This would be important if the user started your batch
file from within an already open command shell. Without setlocal, any
process started from within that shell but after your batch file ran,
will inherit the new setting for JAVA_HOME
Thomas
Stefan Schmiedl - 02 Jan 2007 16:35 GMT
> >> Now the users other java stuff doesn't work correctly.
>
[quoted text clipped - 10 lines]
> process started from within that shell but after your batch file ran,
> will inherit the new setting for JAVA_HOME
You're right there ... I knew there was another reason for using
minuscule exe wrappers instead of batch files.
s.