Installation of Java is really quite easy, if you have done it a few times. However there are a number of considerations that make it impossible for me to provide explicit installation instructions that will work in all situations.
These questions are occasionally crucial to successful installation of Java. However much of the time the above questions will be irrelevant, or else you will be able to answer them with certainty. In particular, if your computer is self-managed, and doesn't yet have Java installed, then installation will be easy. In that case, go ahead with the installation of Java, making use of my notes below and adapting them where necessary to your situation and goals. But otherwise prudence should rule:
|
The following assumes you have 'Administrator' privileges, don't have any pre-existing version of Java to deal with, and are doing an installation in the program area that is common to all users of your computer.
Anyone intending to do Java programming should also download and install (a) the documentation for Java, and (b) Ant. The latter is a utility that is helpful for compiling Java. However if you are simply running Jeda (or the Jeda demo) as is, then these are not necessary, or can be added later.
Ant is available as a .zip, .tar.gz or .tar.bz2 archive file. Choose whichever you are most familiar with.
Installation is simply by running the downloaded .exe file. During installation some simple questions will be asked. I recommend that you avoid nominating directories containing spaces (i.e. avoid C:\Program Files\etc...). Spaces are a problem in some contexts, so I generally nominate C:\Java as the installation directory. But even if you choose to install under C:\Program Files, then it is possible (where necessary) to refer to its alias C:\PROGRA~1 instead.
After installing Java, the final step is to add (or modify) your environment variables. These are a number of labelled values that are commonly used for system configuration. In the present context they are used by the operating system find where Java was installed, and to help programs like Jeda to locate certain resources.
Windows users will need to look under Control Panel → [Administration →] System → Advanced → Environment Variables.
You will see that there are 'User variables' which are applicable only to the current user (you), and 'System variables' which are applicable to all users (and only an Administrator can change them). You can add Java-related variables to either category: it all depends on whether you have Admin rights, and how you want to manage the system.
This is a good time to glance at what variables are already defined. If you see JAVA_HOME, JAVA_BINDIR or ANT_HOME already defined, then maybe Java is already installed and being used for other tasks. Proceed with caution!
But if JAVA_HOME, JAVA_BINDIR and ANT_HOME are not yet amongst the User or System variables, then you can add them without concern. The variable PATH is guaranteed to be already present amongst the System variables; accordingly you will need to append the location of Java's executable files to whatever is already in PATH. This is done by highlighting PATH, pressing 'Edit' and amending the variable value by appending a ';' (the path separator), followed by the path to wherever java.exe resides. You can append the path explicitly (append ';C:\Java\jdk1.6.0_16\bin', say); however you have already defined JAVA_BINDIR to have this value, so the smarter thing to do is append ';%JAVA_BINDIR%' to whatever is already in the PATH. [What is with the '%' characters? That is just a sign to Windows that you are wanting to append the value of the variable JAVA_BINDIR, rather than the word "JAVA_BINDIR" — quite a different operation.] That is what to do if your are an Administrator modifying the System variable PATH; however if you can't or don't want to be Administrator you can set a User variable named PATH. In this case it may not exist yet, so you will have to press 'New' instead of 'Edit'.
The table below shows the three variables you need to add (although ANT_HOME is only needed if you are installing Ant), and how to modify your pre-existing PATH.
| Variable | Example value |
|---|---|
| JAVA_HOME | C:\Java\jdk1.6.0_16 |
| JAVA_BINDIR | C:\Java\jdk1.6.0_16\bin |
| ANT_HOME | C:\Java\apache-ant-1.7.1 |
| PATH | <standardPath>;%JAVA_BINDIR%;%ANT_HOME%\bin |
System variable changes do not take effect until you reboot (some claim). User variables changes require you to log in afresh (some claim).
To confirm that the PATH change was successful, open a terminal (and it shouldn't matter which folder you are in), and type the following:
java -version # version should be >= 1.5 javac -version # version should be >= 1.5 ant -version # version should be >= 1.7 [optional]
If the version numbers are reported, and are sufficiently recent, then Java has been installed successfully. Proceed now with installing Jeda.
| Validate HTML CSS | Last changed 2009-09-23 | Chris Rennie |