how to create .exe file using java?

Recommended Answers

All 4 Replies

So, double post and mark other as solved? Which is it? :-(
Normally, you don't create .exe files with java. You create .jar files which the JVM will execute. There are compilers which will take java code and/or jar files and turn them into native executable images. For Linux there is GCJ (gnu compiler for java) which will happily do that for you. For Windows there are the Cygwin and MingW compilers. Here is a link to the Gnu Java Compiler web site that explains a lot: http://gcc.gnu.org/java/

the true question should be: if you want a .exe executable, why are you programming in Java?

commented: true! +14

yes stultuske is right.
But if you want some executable file,then you can simply create executable jar .

"Executable" jars are not executable in the same sense as a .exe
They are just a data repository, containing .class files etc, which must be processed by a java runtime executable (java.exe or javaw.exe).

Be a part of the DaniWeb community

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