How can I run a java application by double clicking the file in windows environment as we do with other exe files Developing applications in java involes writting *.java file compiling it with Javac and running it with java filename, but if JRE is not available on a particular machine and I wish to run it how can it be accomplished.

Christopher Schultz

You cannot run a Java program where a JRE is not installed.

If you package your application into a JAR file, and edit the manifest correctly, you can make the JAR file 'executable' so that when the JRE starts it, it will automatically use use a specified class name for the 'Main' class.