Article View: aus.computers.java
Article #540Re: Linux Compiler
From: Yiu Chu
Date: Sat, 19 Aug 2000 00:00
Date: Sat, 19 Aug 2000 00:00
57 lines
2099 bytes
2099 bytes
Most likely, you haven't set up your
path correctly so that it compile but
couldn't find the compiled file to run.
Yiu.
"Terry" <kj5zr@cowtown.net> wrote in message
news:399D24E8.D855DC50@cowtown.net...
> I'm just starting out learning Java and am having problems with my Linux
> Java compiler. The first time it worked with the simple javascript that
> I wrote. I've tried to write two others and neither of the others will
> run. It compiles it but will not run them.
>
> Here's the ones I wrote:
>
> Big Debt.java (This one worked the first time):
>
> class BigDebt {
> public static void main (String arguments[]) {
> int debt = 59000000;
> debt = debt / 86400;
> System.out.println("A second's worth of debt is $" + debt);
> }
> }
>
>
> Root.java:
>
> class Root {
> public static void main(String[] arguments) {
> int number = 225;
> System.out.println("The square root of "
> + number
> + " is "
> + Math.sqrt(number) );
> }
> }
>
>
> Hello World.java:
>
> class HelloWorld {
> public static void main (String args[]) {
> System.out.println("Hello World!");
> }
> }
>
> **********************************************
>
> After compiling them and try to run the resulting .class program, I
> get the following error:
>
> Exception in thread "main" java.lang.NoClassDefFoundError:
> HelloWorld/java
>
>
>
Technical Details
Message-ID:
<8nl1gl$jif$1@bugstomper.ihug.com.au>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<399D24E8.D855DC50@cowtown.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d6db,d3499557585ba5ff X-Google-Attributes: gid10d6db,public From: "Yiu Chu" <yiuchu@ihug.com.au> Subject: Re: Linux Compiler Date: 2000/08/19 Message-ID: <8nl1gl$jif$1@bugstomper.ihug.com.au> X-Deja-AN: 659977253 References: <399D24E8.D855DC50@cowtown.net> X-Priority: 3 X-Server-Date: 19 Aug 2000 04:13:09 GMT X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 Organization: The Internet Group (Sydney) X-MSMail-Priority: Normal Newsgroups: aus.computers.java