You need to append the directory containing David.class to your
CLASSPATH environment variable; e.g.,

        export CLASSPATH=/some/dir/1:/some/dir/2:/your/class/dir

where /your/class/dir contains David.class.

        --troy

On Fri, 27 Nov 1998, David House wrote:

    I just installed the JDK on a RedHat 5.1 Linux machine.  The javac seems to be 
working fine, but when I try to run an application, it gives me the error Can't find 
class 'whatever'.  For example, here is my code
     
    David.java:
     
        class David
        {
            public static void main( String[] args )
            {
                System.out.println( "Hello!" );
            }
        }
     
    I compiled it like:
     
        javac David.java
     
    running it like
     
        java David
     
    error message:
     
        Can't find class David
     
     
    If you need more information on the config, please let me know.
     
    Thanks,
    David House
     
    

Reply via email to