Type jar cmf mainClass.txt hello.jar Hello.class [add other classes here] Run with java -jar hello.jar [arguments here] So to auto-execute on a windows box, a command like File: execute-java.cmd Contents: java -jar %1 Arrange windows to launch .jar files with execute-java.cmd