Rev. 29 October 2012
- If your lappy is a Windoze machine, go to this link to get the install program for the JDK (not just the JRE). Download the program, run it, and reboot your machine. It is a big download, so hang around a place with a good access point whilst doing it. On this page, you can also obtain the Java 6 Documentation and install in on your box. We highly recommend you get this documentation. You will use it a lot in programming Java and it frees you from worrying about being on a network while working.
- If you are a Mac User, you have a JDK. You should get the documentation.
- If you are an Ubuntu jser, you will need to download the package
sun-java6-jdk or use the openjdk 7 compiler. To do this you will need to ee
Morrison's source.list file. Edit yours to look
like it; this will mostly consist of uncommenting lines. Then enter these
commands
Now the JDK package will be visible. Download it via apt-get. DrJava now plays nicely with Java 7 and the openjdk JDK package. We will post any updates pertaining to Ubuntu 12.10 here soon.
$ sudo apt-get update $ sudo apt-get upgrade
- Now go to The DrJava Site and download DrJava for your platform. This site offers complete instructions on using and installing Java. If you browse the user's manual, you can learn about many productivity tools that will make programming faster, easier and more fun.
Some Linux Insall Hints
Once you are done with all of your installing, reindex your HD with the command
$ sudo updatedb
This makes it easy to search for files with the locate command.
You are now ready for to program in Java.
To make things easy, make a directory called bin in your home directory. Place drjava.jar in it. You can place the drjava file in an existing bin directry if you have one. Then place this alias in your .bashrc file.
alias drjava java -jar ~/bin/drjava.jar
To use DrJava, open a terminal and type
$ drjava
It should launch in a few seconds.
To See if All is Well on all Platforms Open drJava and place this text in the code window.
public class Foo
{
}
Hit F5 and you wile be directed to save this code; do so under the file name Foo.java. If, in the the bottom window, you see "Compilation Completed," you are golden.