954,554 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How to create an exe for a Java application

hi all,

Can we create an exe for a Java application so that we can run it directly by executing the exe?

aripaka
Light Poster
36 posts since Aug 2005
Reputation Points: 10
Solved Threads: 0
 

Java's executable files are .jar files instead of .exe. Different extension, but you can still double-click the file to run the program.

Phaelax
Practically a Posting Shark
858 posts since Mar 2004
Reputation Points: 92
Solved Threads: 51
 

There is no direct way to make a .exe for running a java file.

The way i prefer to make a clickable icon or link for starting a java application is through a .bat file.

here is an example:

set cp = c:/java/jre/lib/rt.jar;
set cp = cp;<other class path info...>

java -cp cp <then your class name>


That should be close enough for you to figure it out from there.

Regards,

Nate

hooknc
Posting Whiz in Training
219 posts since Aug 2005
Reputation Points: 11
Solved Threads: 8
 

Try J2EXE...

mmiikkee12
Posting Whiz in Training
274 posts since Oct 2004
Reputation Points: 17
Solved Threads: 5
 

Executable jar files work perfectly.

server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20
 

But they're REALLY hard to make... stupid manifest files...

mmiikkee12
Posting Whiz in Training
274 posts since Oct 2004
Reputation Points: 17
Solved Threads: 5
 

They're in fact really easy to make...
Just read the instructions which are clear, all you need is a single line of text in your manifest file, how hard can that be?

If you're too dumb or lazy to create that, there's no hope for you in the industry and we're better off without you.

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

Most IDE's create the manifest for you even.

Phaelax
Practically a Posting Shark
858 posts since Mar 2004
Reputation Points: 92
Solved Threads: 51
 

yup, and so can ANT and other build tools. But of course you need to learn how to use them and if someone is too lazy or stupid to read the documentation for the jar command I don't expect them to read the documentation for ANT or an IDE either.

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

Hi everyone,

See the below link on creating executable jar archives

http://www.wizardsolutionsusa.com/forum/showthread.php?t=100

Richard West

freesoft_2000
Practically a Master Poster
623 posts since Jun 2004
Reputation Points: 25
Solved Threads: 10
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You