Installation of the Java Software Kit (SDK) for Windows 2000/NT/XP


Users who need to import the JavaTM2 SDK Standard Edition, v 1.X.X as well as the serial port communication API, can follow steps listed below:

If you do NOT need a full Java Development Package and wish to simply operate the SRT, Then the SRT Executable Software may be a better choice.


MS-Windows 2000/NT/XP - As of June 4, 2003


C:\ is used in this instruction as the normal MSDos default hard drive designation. Also the default directory for the Java Software Kit when Installed is j2sdk1.X.X_nn, hence the reference to C:\j2sdk1.X.X_nn.

1. Download the latest Java software package from java.sun.com

Latest version tested with the SRT j2sdk v 1.4.1_01
Newest version available from Sun j2sdk v 1.4.2 (beta)
Warning - Be Sure to Download the JDK (Java Development Kit), not the JRE (Java Runtime Environment)

Notes: It is recommended to create a subdirectory in which to download the JavaTM software package (typically a .EXE file ~40 mb in size) and the Java Communications API. When the Java download file is executed, the installation process will list a default directory that includes the SDK version number. It is also recommended to include this version number in the destination directory so that the user can identify updated downloads in the necessary PATH statements below.
2. Also from sun, retrieve the serial port Java Communications API. - presently, Version-2 of javacomm20-win32.zip

3. Install Java by running the executable file j2sdk-1_X_X_nn-windows-i586.exe

Note: Clicking on the j2sdk-1_X_X_nn-windows-i586.exe file will open the Java SDK Install Shield which, like many windows install programs, will direct you through the installation process.
4. Unzip the javacomm20-win32.zip

Note: Use WinZip version 1.7 or later. Some older versions of Pkunzip will not create the java.comm.properties file.
5. Copy the comm.jar and the javax.comm.properties to the C:\j2sdk1.X.X_nn\jre\lib\ subdirectory

6. Copy the win32com.dll file (created when you unzipped the javacomm20-win32.zip file) to theC:\winnt\system32 (or C:\windows\system32 on XP) subdirectory

In Windows 2000/NT/XP, The system allows for individual environment variables such as PATH and CLASSPATH to be set for each system user without the need for an autoexec.bat file. The SRT Java software requires the user to add two lines to their existing environment variables.

1. Click on the Start button on your screen and select "Settings" then "Control Panel"

2. In the Control Panel Window, select the "Systems" icon. This will open a dialog box that includes 5 tabs. Select "Advanced"

3. Of the three action bars dispalyed, select "Environment Variables"

4. Under the upper "User Variables for "your login name" Select "New"

You will see two dialog boxes the top labelled "Variable Name" and the bottom labelled "Variable Value". You will need to add two new variables, PATH and CLASSPATH.(See the table below)

Variable Name Variable Value
PATH C:\j2sdk1.X.X_nn\bin
CLASSPATH .;C:\j2sdk1.X.X_nn\jre\lib\comm.jar
Note: You will need to logoff to activate the environment variable additions.


Windows XP/2000 users will also need to inhibit the Mouse Pointer "Shadow", as this feature interferes with certain aspects of the SRT User Console.
To turn off shadowing:

Windows 2000 Windows XP
Mouse-click "Start" Mouse-click "Start"
Select "Settings" Select "Control Panel"
Select "Control Panel" Select "Printers and Other Hardware"
Select "Mouse" Select "Mouse"
Select "Pointers" tab Select "Pointers" tab
De-select "Enable Pointer Shadow" at the bottom of the window De-select "Enable Pointer Shadow" at the bottom of the window

Compile and Run:
It is recommended that you download the SRT Java control files, to a dedicated directory to avoid confusion with other program files. The SRT software-defaults will read and write files that are resident in the directory from which the SRT is run. The user is free to read and write to and from the directories of their choice, but if that choice is left to defaults, the usefulness of a dedicated SRT sub-directory will become obvious!

Open a Command Prompt window (Click, Start, Programs, Accessories then Command Prompt)

cd SRT Directory
The syntax for compiling the SRT JAVA code is:

javac *.java

SRT users need to construct an ASCII file label srt.cat. This file contains the user sourcelist, the telescope station latitude and longitude, telescope azimuth and elevation limits, in addition to other optional parameter settings if "normal" SRT default settings are not optimum to the user. Information regarding the srt.cat file can be found in the Small Radio Telescope User's Guide which can be downloaded by clicking on the highlighted text below.

java srt 1 1 (simulator mode)

java srt 0 (operate mode)

Each of the above commands will open the SRT console window. Simulator mode will demonstrate the capabilities of the SRT console without the hardware. The compile and run commands are intended to be entered using a Command Prompt environment.