• Post Reply Bookmark Topic Watch Topic
  • New Topic

RUN JAVA APPLICATION WITHOUT JRE

 
RONEY PATEL
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,
I HAVE MADE ONE PROJECT IN JAVA AND I HAVE TO RUN IT ON A MACHINE IN WHICH THERE IS NO JAVA RUNTIME ENVIRONMENT. HOW COULD I INSTALL / RUN IT ON THAT MACHINE ??? CAN A JAVA APPLICATION BE DISTRIBUTED ON THAT MACHINE ???
PLZ HELP ME....
REGARDS,
RONAK PATEL
roneypatel@indiatimes.com
 
Amitesh chandra
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I think you are trying to use in a way which is not possibe.........
Just for information if you try to run any Java application you have to be forst install the JVM first and then the application else try to make web based application using JSP and Servlet.
Thanks
Amitesh
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can distribute the application without a JVM but then the customer won't be able to use it without first obtaining and installing a JVM themselves.
 
Abhinav Anand
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!