You need software tools to build Java programs. Unless otherwise indicated, all tools mentioned here are freely available, and most of them are open-source.
Full-strength IDEs (eg NetBeans or Eclipse) are not usually the best choice for beginning students because learning the tool in addition to learning programming can be too much, and perhaps they hide some of the underlying issues of programmin a little too much.
For the intermediate or advanced students it's extremely useful to use an IDE, especially because it can increase your programming productivity, and because it's a useful skill.
This is a nice, simple program with the advantage that you can mess with the source if you really feel like it (only 300KB including the source!).
There are a number of options if you want to go beyond simply distributing a .jar file of your program. There are a number of installer generators that you can use. Naturally, there are some good commercial installers, but there are also a number of free installers.
With some installers you can bundle an appropriate version of the JRE (Java Runtime Environment), which will be installed if it's not already on the host machine.
See Open Source Installers Generators in Java (java-source.net/open-source/installer-generators)