Article View: aus.computers.java
Article #539Linux Compiler
From: Terry
Date: Fri, 18 Aug 2000 00:00
Date: Fri, 18 Aug 2000 00:00
46 lines
1782 bytes
1782 bytes
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:
<399D24E8.D855DC50@cowtown.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d6db,d3499557585ba5ff,start X-Google-Attributes: gid10d6db,public From: Terry <kj5zr@cowtown.net> Subject: Linux Compiler Date: 2000/08/18 Message-ID: <399D24E8.D855DC50@cowtown.net> X-Deja-AN: 659697762 Content-Transfer-Encoding: 7bit Organization: Posted via Supernews, http://www.supernews.com X-Accept-Language: en Content-Type: text/plain; charset=us-ascii MIME-Version: 1.0 Newsgroups: aus.computers.java X-Complaints-To: newsabuse@supernews.com