To make a java program executable by double-clicking (on system's where you can open programs that way) you have to put all the .class files into a .jar file together with a manifest file stating where the main method. The java documentaion (available for download from Sun's java site) explains how to make a manifest and .jar file
Obviously it will still only run if the machine has a JVM installed. Less obviously, if you use features from a version of Java that is later than the installed JVM you will get unpredictable results. The Java documentation lists the version in which each feature first was released.