posted 20 years ago
Hello Roney,
As far as i get it you have designed a java based application and want to run it on a client machine no matter whether a jre/jdk is installed or not. If this is the scenario in which you want to simply run the application without the client having to go through the hassles of installing the jvm then i think embedding the jre in your application is a suitable way out.
To embed a jre you have copy the jre folder in your machine into your local path and point the java home, class path, system path etc. to that directory so that the os can find the javaw.exe without any sort of trouble.
So, the installatio directory should look like:
<install>
|--- <jre>
| |--- bin
| |--- ...
|--- Your files...
in the startup script you can place commands like this.
set path=%path%;./jre/bin;
set classpath=%classpath%;.;./jre/lib/tools.jar;
.....
.....
javaw <your application>
Another approach is to use java based installers like exe4j etc. which make exe for java applications and enable you to run your code directly.
I hope it helps.