If you want to learn how to make standalone applications in java then you can visit to
http://docs.oracle.com/javaee/6/tutorial/doc/gkcpv.html and one more thing is that you can write the codes in netbeans so that you can easily get .jar file which are executables and easily run on other platforms.