with java u will create JAR files that will run the startup class of ur program.
u will need to create menifest file for it.
here is a procedure to create jar files. -
-*csdl.ics.hawaii.edu/~johnson/613f99/modules/04/jar-files.html
u can also register JAR extension to run directly by double clicking.
just associate .jar extension with
command