Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Oct 2000 16:27:15 +0100
From:      "Aleksandar Simic'" <alex@frustum.clara.co.uk>
To:        freebsd-java@freebsd.org
Subject:   Java CLASSPATH problem
Message-ID:  <20001006162715.A745@frustum.clara.co.uk>

next in thread | raw e-mail | index | archive | help
Hello,

I just installed Java and I cannot get it to work properly. If you can
help me I would be very grateful.

Here is the necessary information:

[alex@~/study/internet_prog_3sfe217] uname -a
FreeBSD myname.my.domain 4.0-RELEASE FreeBSD 4.0-RELEASE #3: Sat May
27 19:54:30 BST 2000 alex@myname.my.domain:/usr/src/sys/compile/ALEX
i386

// A first java program
// HelloWorld.java
class HelloWorld
{
    public static void main (String args[])
    {
	System.out.println("Hello world");
    }
}

paths to java:

[alex@~/study/internet_prog_3sfe217] which java
/usr/local/jdk1.1.8/bin/java
[alex@~/study/internet_prog_3sfe217] which javac
/usr/local/jdk1.1.8/bin/javac
[alex@~/study/internet_prog_3sfe217] 

classpath set in ~/.profile:
CLASSPATH=.:/usr/local/jdk1.1.8/lib/calsses.zip; export CLASSPATH

[alex@~/study/internet_prog_3sfe217] echo $CLASSPATH
.:/usr/local/jdk1.1.8/lib/calsses.zip

Then I do this:

[alex@~/study/internet_prog_3sfe217] javac HelloWorld.java 
[alex@~/study/internet_prog_3sfe217] java HelloWorld.class 
Can't find class HelloWorld.class
[alex@~/study/internet_prog_3sfe217] ls -l
total 2823
drwxr-xr-x   2 alex  alex  -     512 Oct  6 16:21 ./
drwxr-xr-x  14 alex  alex  -     512 Oct  6 00:00 ../
-rw-r--r--   1 alex  alex  -     471 Oct  6 16:13 HelloWorld.class
-rw-r--r--   1 alex  alex  -     137 Oct  6 00:11 HelloWorld.java
-rw-r--r--   1 alex  alex  -   27583 Oct  6 01:12 install_java.html
-rw-r--r--   1 alex  alex  - 2842999 Oct  6 01:35 jdk-1_1_8_003-doc.tar.gz
[alex@~/study/internet_prog_3sfe217] 


What am I doing wrong ? Thank you in advance.

--Alex


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001006162715.A745>