How to set up classpath on FreeBSD Unix?

RobertMaas_at_YahooGroups.Com
Date: 06/04/04


Date: Fri, 04 Jun 2004 12:51:24 -0700

I'm trying to figure out how to set up some packages of my own java
classes (on FreeBSD Unix, running tcsh as the shell).
Below is what I tried. What am I doing wrong?

% pwd
/home/users/rem/JavaWork
% ls -d Cl*
1 Classes/
% ls -d Cl*/*
1 Classes/animals/
% ls -lt Classes/animals/
2 -rw------- 1 rem user 1417 Jun 3 15:48 Pet.class
2 -rw------- 1 rem user 1457 Jun 3 15:47 Pet.java
% more Classes/animals/Pet.java
package animals;
import java.util.*;
abstract class Pet {
..
% more Dog.java
import animals.*;
class Dog extends Pet {
..
% echo $classpath
classpath: Undefined variable.
% setenv classpath /home/users/rem/JavaWork/Classes:.
% echo $classpath
/home/users/rem/JavaWork/Classes:.
% javac Dog.java
Dog.java:1: Package animals not found in import.
import animals.*;
       ^
Dog.java:3: Superclass Pet of class Dog not found.
class Dog extends Pet {
                  ^
2 errors