hi all,

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

Recommended Answers

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

Jump to Post

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 …
Jump to Post

Try J2EXE...

Jump to Post

All 9 Replies

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

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

Try J2EXE...

Executable jar files work perfectly.

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

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.

Most IDE's create the manifest for you even.

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.