Installing and Running

From Fs_wiki

Jump to: navigation, search

Contents

Getting Java

Download and install JDK 5.0 Update 6 for free from java.sun.com/download. This contains the compiler as well as a runtime environment. If you want a shorter download and are not interested in looking at the Tunnel code, get JRE 5.0 Update 6 instead.

For more information, see History of Tunnel and Java.

Getting Tunnel

There are two ways to download Tunnel. You can either use the file from the front page Downloads, and unzip it into a directory of your choice (eg inside one called "caving"). Or you can get Tunnel from CVS, which is more preferable because you'll get the bugs as soon as they are fixed (you will then need to compile Tunnel before you can run it).

Running Tunnel

Tunnel is best run from the command line in the "tunnelx" directory by typing:

> java -cp . Tunnel.MainBox

If you are in Windows and don't know what a command line, you get it by clicking on Start, and Run..., typing "cmd" into the box, and hitting return. This is the command line. It's a black window with a cursor. Some versions of Windows let you right-click on the "tunnelx" directory and select "Open Command Window Here". Then you can type the command above.

If that doesn't work, try double-clicking on the file called "r.bat" in the "tunnelx" directory and it should start up. If everything fails, contact julian@goatchurch.org.uk for further ideas.

If Tunnel does start up, you should see the following window on the screen:

Batch files

I have included a couple of batch files or shell scripts in the "tunnelx" directory to save all this typing. One is "b.bat" which reads:

> "C:\Program Files\java\j2sdk1.5.0\bin\javac" src\*.java

So, simply typing "b" on the command line will compile everything, once you've edited it so it points to wherever your version of the "j2sdk1.5.0" has been put.

The other is "r.bat":

> java -Xmx200M -cp . Tunnel.MainBox inlet7

The "-Xmx200M" is to give Java lots of memory to work with if it needs it (200Mb, or thereabouts). The final word, "inlet7" makes it autoload the example to save going through the file-dialog thing every time.

Navigation

Personal tools