views:

191

answers:

3

as running any exe file or something..??

+2  A: 

Make an executable JAR file:

http://csdl.ics.hawaii.edu/~johnson/613f99/modules/04/jar-files.html

Amber
Java Web Start is the more modern / robust version of this.
Sean Owen
@Sean: Seeing his other questions on the Java subject, JWS is probably far beyond his actual intent and understanding. An executabele JAR is the most straightforward choice here.
BalusC
... but this would not be double-clickable like an .exe. A JWS file would.
Sean Owen
Not true, Sean. On most systems executable JARs are double-clickable as long as a JRE is installed.
Amber
+1  A: 

You can create an executable with one of the following:

Scott Bennett-McLeish
You can create desktop icon to launch Java app without repackaging it as exe. Depending on what OP actually wants, this may be overkill.
Jonik
for example i want to send this file to some one.. he/she must have the java library on his/her computer right..??
WM
@WM, If you want to create a file that can be executed regardless of whether there's JRE installed, then indeed you should look at tools that can create an exe with bundled JRE, such as Launch4j or exe4j mentioned by Scott.
Jonik
+2  A: 

Use Java Web Start to package and deploy your application on a web server.

During launch, It will create desktop shortcuts that can connect to a server and update your application if updates are found.

It also has other advantages, like the fact that it can ensure that you have the right virtual machine, and download the right one in case you don't

Mario Ortegón