| Asante, Emmanuel [ING WBK] on Mon, 17 Feb 2003 13:59:44 +0200 (SAST) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| [Linux dev] Re: OT: Java Installation |
The problem is that "javac Classname.java" does not do anything; the cursor
just jumps to the next line and stays there for ever.
-----Original Message-----
From: Bongani Hlope [mailto:BonganiH@xxxxxxxxxxxxxxx]
Sent: 17 February 2003 01:46 PM
To: Emmanuel.Asante@xxxxxxxxxxxxxxx
Cc: dev@xxxxxxxxxxxx
Subject: [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"
EOM
NOTICE - This message and any attached files may contain information that is
confidential and/or subject of legal privilege intended only for use by the
intended recipient. If you are not the intended recipient or the person
responsible for delivering the message to the intended recipient, be advised
that you have received this message in error and that any dissemination,
copying or use of this message or attachment is strictly forbidden, as is
the disclosure of the information therein. If you have received this
message in error please notify the sender immediately and delete the
message.