Tapper Read Me Page


  Tapper version 0.01 Readme

How To Build And Run Tapper

The following directions assume you have Java properly installed.
At this point Tapper should compile on JDK 1.1.7 and 1.1.8 (With swing added) as well as 1.2 and 1.3 (where swing is part of the core JDK). However, once we start developing the MIDI code tapper MUST be compiled and run with JDK 1.3 so go get it now if you don't already have it.

All tools mentioned in this file can be found via the tools link at tapper.sourceforge.net

1. How To Build

Install ANT. http://jakarta.apache.org/ant/index.html Follow all instructions in the Ant documentation (Refer to those directions for exact instructions, this is just an overview. Essentially you must:

  1. Decompress the tarball.
  2. Create an ANT_HOME environment variable.
  3. Put the Ant jar files (ant.jar, parser.jar, jaxp.jar) into your classpath.
  4. Put the ant/bin directory in your path.

Next, put the tapper/lib directory into your classpath.

Lastly, cd to the tapper directory (the one with build.xml in it) and type:


ant

And the project should build. From that point on simply typing "ant" will build any changed files.

2. How To Run Tapper

As long as the tapper/lib directory is in your classpath you can type


java com.gregb.tapper.Tapper

from any directory and tapper will run.

At this point there is no jar file. We will do that soon.

******************************************************
License:

This software is open source and is licensed under the GNU Public License. There should be a file called "LICENSE" that accompanies this software with a full description of the GPL.

 



 

A Brief Discussion of Classpath

It seems that one of the most common problems for new Java programmers is understanding the concept of classpath. There are two types of path on a Java developer's computer.

  1. Path : is an environment variable that points to directories with executable programs.
  2. Classpath : is an environment variable that points to direcotries and/or specific files that contain Java classes.


Classpath and Packages

Any non-trivial Java program will use packages. A package name is a way to insure that your filenames are unique. For example, Java has a string tokenizer class that can (for example) split a comma delimited string into several strings. But lets say you wrote your own class called StringTokenizer that has more funciontality than the Java StringTokenizer class. How would you tell them apart since they have the same class name?

You do this by putting your class in a package. The standard method for building package names is to invert your domain name. So, if your domain name is foo.com and you wanted to have seperate packages for utils, gui, and actions then you would create these package names:

  • com.foo.utils
  • com.foo.gui
  • com.foo.actions

Now, assuming that you have a directory called "MyProject" you would then create a directory structure under MyProject that mimics the package names. So under the MyProject directory you would have a "com" directory. Under the com directory you would have a "foo" directory. Under the foo directory you would have three directories named "utils", "gui", and "actions".

If you put your StringTokenizer class in the com/foo/utils directory then the real name of you StringTokenizer class is now com.foo.utils.StringTokenizer which is unique from the class java.util.StringTokenizerprovided that the very first line of your StringTokenizer class is

package com.foo.utils;

For this first example we'll assume the class files are in the same directory as the java files. In this example you would put the "MyProjects" directory in your classpath. DO NOT put MyProjects/com/foo/anything in the classpath. Java will find your files by going to whatever directories are in your classpath and then, if it's looking for the com.foo.utils.StringTokenizer class for example, will automatically search for a com/foo/utils directory. Once it finds that directory structure java will look for the StringTokenizer class in that directory.


How to set your classpath

Windows 98 and 95

We'll assume you want to add c:\MyProjects to your classpath. In your autoexec.bat file add this line:

set CLASSPATH=C:\MyProjects

To check that your classpath is set type "set" in an MSDos window.

However, I do not suggest that anyone try to deal with developing any code in Windows 95 or 98. In my opinion those Operating systems are incapable of being stable enough or fully featured enough to develop code.

Windows NT

Right click on the "My Computer" icon and select "Properties".

Go to the environment tab and create a new environment variable called "CLASSPATH". If CLASSPATH already exist then simply click on it.

In the bottom text field type "C:\MyProjects".
If a classpath variable already exist then type a semicolon at the end of the existing classpath and then add your directory at the end. You may have multiple directories in your classpath seperated by semicolons.

To check that your classpath is set properly type "set classpath" in an MSDos window.

Linux

If you want all users to have access to this class path do the following in your /etc/profile file. If you want to set the classpath for a single user then do the following in your ~/.bash_profile file. ( The tilde ~ means "your home directory").We will assume that the directory you want to add is ~/MyProjects

Using vi, vim, JEXT, or whatever tool you like open the appropriate file. and add this line:

export CLASSPATH=~/MyProjects

And save the file. You will have to log out and log back in for this change to take effect.

To check that your classpath is set properly type "cat $CLASSPATH" in a terminal window or at the command line.


Setting the classpath for Tapper

On my computer I have a ~/dev_projects directory. In that directory I've decompressed the tapper source code so I have a ~/dev_projects/tapper directory. In the tapper directory we have a "src" directory that has all the java files and a"lib" directory with all the class files. For Tapper to work properly you need to put this "lib" directory in your classpath. Therefore, on my Linux box I have the line:

export CLASSPATH=~/dev_projects/tapper/lib

I'm sure you can see how this would translate to a Windows OS. If you had a C:\dev_projects directory with tapper in it and lib underneath the tapper directory then your claspath would be:

C:\dev_projects\tapper\lib