Installing Treeview

 Requisites

Treeview is written in java using J2SE1.4. It makes use of some optional components (JAI, JNIAST and JNIHDS), which are installed separately; however if these are absent the program will run quite happily with the corresponding facilities disabled.

Since the core program is written in pure java, it will run anywhere that a Java 1.4 virtual machine is installed, and this means it can run on a wide range of platforms. It has been tested on Linux, Solaris, Compaq Tru64 Unix and MS Windows. Note however that there are currently problems with some of the optional components in Tru64.

The following procedure describes how to install the Starlink java classes from scratch. This gets you Treeview plus some other applications (SPLAT, TOPCAT, SoG, FROG) and utilities (NDTools), along with all the Starlink java infrastructure classes and a number of third party class libraries required by them, as well as the Java Runtime Environment itself. All these are documented elsewhere. Not all of this infrastructures is used by Treeview, but it is currently distributed together for ease of installation and maintenance.

 Installation procedure

Follow these steps:

1. Install version 1.4 of the Java Runtime Environment if you do not already have it.

If you already have java installed, find out what version it is; something like "java -version" will probably tell you this. If the version is lower than 1.4.0, you will need to replace this version or install a separate one for Treeview to use (NB at least one of the beta releases, version 1.4.0-beta3, is known not to work, so you probably need a proper release).

You can get versions for Linux, Solaris/SPARC, Solaris/x86 and MS Windows from Sun's web site (you only need the JRE download rather than the SDK, unless you will be doing development work). MS Windows users can use Sun's automatic download procedure if they prefer. J2SE Runtime Enviroments (sometimes called JVM or Java Virtual Machines) for other platforms may be available from operating system vendors; Sun maintains a list of java implementations for other platforms; make sure you get version 1.4.0 or higher.

2. Install Java Advanced Imaging (JAI) (Optional)

JAI is used for graphical display of arrays; without this you will not be able to see image-type display of data files.

Download this package from the Sun download site. Unless you are doing development, you will want to use the "JRE install" option (note the CLASSPATH install will not work without some changes, because of the way that Treeview does its class loading).

Although Sun only advertises versions for Solaris, Linux and MS Windows, it is possible to use these on other platforms; if you have a different platform download, say the Linux one and install it anyway. This should provide the necessary imaging functionality, but without some platform-speicific graphical acceleration. You may also see some complaints at runtime about missing components.

3. Install the Starlink Java classes

Download the Starlink java set as a zip archive or compressed tar archive (Unix users should use the tar archive since it gets the permissions right) and unpack it somewhere suitable. This contains not only the jar files which contain the classes, but various scripts and other platform-independent run-time files which may be useful.

Some platform-dependent files (native libraries) are also included. They are currently installed for the following platforms:

If you do not have one of these platforms, some of the facilities may be unavailable; these are generally those provided by the JNIAST (coordinate manipulation) and JNIHDS (Starlink HDS/NDF file format access) packages. If you need these for a platform which is not listed above, contact Starlink to enquire about availability.

 Away you go

The package is now installed.

To invoke the Treeview tool on Unix you should now put the "bin" directory (which contains the "java" command) from the JRE which you installed at step (1) on your path, and you can then use the script

    starjava/bin/treeview [file ...]
under where you unpacked the starlink classes in step (3) to invoke Treeview.

If this doesn't work (and on non-Unix operating systems it may well not do) then change directory to the starjava/lib/treeview directory and invoke Treeview by doing

   java -jar treeview.jar [file ...]
You may also be able to invoke this jar file directly, for instance by clicking on it in Windows.
Back to the main Treeview web page.