Latest version 

Java-based Exploratory Data Analysis for EEG

Java installation: Windows

 

Welcome

Getting started

For users

For developers

Introduction

If you are reading this, then you have probably been directed here from Java installation, as a result of discovering that you need to install Java.

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:

In order to install Java in less-than-ideal cases, it is extremely helpful to have system administration skills.

These non-trivial cases will require judgements to be made based on your context, and may require some trial and error. The judgements relate mainly to placement of directories, and ensuring the PATH is not messed up.

However Java does not touch anything to do with the operating system or desktop, so any problems you may have will be limited and reversible.

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.

Installation

Downloads

The version from Sun is most definitive, and comes in several flavours: JRE which can run Java but not compile, JDK Micro Edition for embedded devices, JDK Standard Edition for most situations, and JDK Enterprise Edition for 'enterprise' situations. All four supply the crucial Java Runtime Environment (JRE), but only the latter three versions allow for compilation — essential for Jeda. These three have distinct specialized goals; accordingly, I recommend installing JDK SE, of which JDK 6 Update 16 is the current version. Sun offers JDK SE as a download, as well as offering other downloads where the JDK is bundled with other products: JavaFX, NetBeans, GlassFish and so on. Your choice. If you choose the basic JDK SE, then the downloaded file will have a name like jdk-6u16-windows-x64.exe (i586 and Itanium versions are also available).

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 of Java

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.

Installation of Ant

I recommend placing the download file in the same directory as you chose for Java (e.g. C:\Java). Ant is written in Java, so the download simply needs to be unpacked — there is no compilation required.

Environment variables

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
where the paths should obviously reflect your own installation choices. You only need to specify ANT_HOME if you had installed Ant. If you installed Java under C:\Program Files\whatever then it is essential that you refer to this location as C:\PROGRA~1\whatever. Note that the variable values should not have a '\' as their final character.

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.

Uninstalling

Should you ever wish to uninstall Java, and you followed the instructions above, then it can be achieved thus:
  1. Delete the folder pointed to by JAVA_HOME
  2. Delete the variables JAVA_HOME, JAVA_BINDIR and ANT_HOME
  3. Edit PATH to remove ";%JAVA_BINDIR%" (or whatever you added)

 

Validate HTML CSS Last changed 2009-09-23 Chris Rennie