Download the java sdk from the sun web page:
Make sure you grab the SDK
and not the jre only since you want to have javac to compile code also.
Next thing you want to do is set up your path so you can access java without having to type:
This can be done by altering the file .bash_profile in your user directory. You should see a line like:
you can add java to your path by changing it to:
Now you should be able to access java in a manner comparable to how you do at school. Keep in mind, if your school is like mine was, the java they used was horribly out of date. The code might not compile the same on their machine, but that's neither here nor there.