Bongani Hlope on Mon, 17 Feb 2003 13:54:10 +0200 (SAST)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Linux dev] Re: OT: Java Installation


Asante, Emmanuel [ING WBK] wrote:
Hi All,

I have installed the Java SDK Jdk1.3 on a machine running RH8.0 and added
the java directory to the path. However, if I try to compile any code, the
system accepts the command but nothing happens. Typing "java" alone comes
back with the usage format. Giving the classpath as a command line option
does not make any difference. Can anyone tell me where I am going wrong? I
have installed the JDK on M$ Windows machines without problems.

Regards,

Emmanuel Asante

EOM

To compile you have to run javac Classname.java this should produce a file called Classname.class, to run that file run java -classpath .:$CLASSPATH Classname


If you .java file has a package statement, then to run it you have to run it as java -classpath .:$CLASSPATH pakagename.Classname

Cheers

--
Once ... in the wilds of Afghanistan, I lost my corkscrew, and we were
forced to live on nothing but food and water for days.
                -- W. C. Fields, "My Little Chickadee"