Hi

can we create an exe file in java and used it anywhere we want without using any jdk/jre

deepti

No.

first part, yes, you can create .exe files from java progs, but no, an exe can not be used everywhere you want.

by creating an exe file, the program will no longer be cross-platform. you can, however, create .jar files that (basically) do the same as .exe files and that can be used on different platforms

So if i create the .jar file can it used without installing the jdk/jre on any other machine..
Pls suggest will the jar file be used without jdk/jre on any other machine.

No, it is expected that the "client" (or to be installed on) machine already has a jdk/jre (which it probably does, just maybe not the right version).

So if i create the .jar file can it used without installing the jdk/jre on any other machine..
Pls suggest will the jar file be used without jdk/jre on any other machine.

No, jars cannot run without a JVM. You can use an installer to faciliate the installation of Java as part of installing your app if you wish. A good free (open source) one is IzPack http://izpack.org/start

This article has been dead for over six months. Start a new discussion instead.