Well, you can get a good C/C++ compiler for free. If you have Windows installed, try www.bloodshed.net
and download Dev-C++. It is a very good IDE and comes with Cygwin compiler. For an older DOS machine, you can download Turbo C++ for free from the museum portion of Borland's website. Java can be had as a command line package from SUN's website. Online tutorials and programming forums will get you a good start. Wish you luck.