473,396 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Probably a n00b error... :)

E:\java\projects\console>javac -verbose HelloWorld.java
[parsing started HelloWorld.java]
[parsing completed 380ms]
[loading E:\java\j2sdk1.4.1_02\jre\lib\rt.jar(java/lang/Object.class)]
[loading E:\java\j2sdk1.4.1_02\jre\lib\rt.jar(java/lang/String.class)]
[checking HelloWorld]
[loading E:\java\j2sdk1.4.1_02\jre\lib\rt.jar(java/lang/System.class)]
[loading E:\java\j2sdk1.4.1_02\jre\lib\rt.jar(java/io/PrintStream.class)]
[loading
E:\java\j2sdk1.4.1_02\jre\lib\rt.jar(java/io/FilterOutputStream.class)]

[loading E:\java\j2sdk1.4.1_02\jre\lib\rt.jar(java/io/OutputStream.class)]
[wrote HelloWorld.class]
[total 2784ms]

E:\java\projects\console>java HelloWorld.class
Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld/class

What does this mean? I've gotten this error a few times before... The class
is taken straigt from a book, and is only supposed to do
System.out.println("Hello World!"); so i'm surprised it doesn't work...

Yes, i'm a noob... trying to learn java now :) Been doing visual basic for
ages...
Jul 17 '05 #1
3 3086
Tried it from inside BlueJ... and there it gives the output "Hello WOrld!",
but it still won't work in the console...
Help? :)

TIA
Christopher

"Christopher Vagnetoft" <NO********@noccy.com> skrev i meddelandet
news:Yc****************@news2.bredband.com...
E:\java\projects\console>javac -verbose HelloWorld.java
[parsing started HelloWorld.java]
[parsing completed 380ms]
[loading E:\java\j2sdk1.4.1_02\jre\lib\rt.jar(java/lang/Object.class)]
[loading E:\java\j2sdk1.4.1_02\jre\lib\rt.jar(java/lang/String.class)]
[checking HelloWorld]
[loading E:\java\j2sdk1.4.1_02\jre\lib\rt.jar(java/lang/System.class)]
[loading E:\java\j2sdk1.4.1_02\jre\lib\rt.jar(java/io/PrintStream.class)]
[loading
E:\java\j2sdk1.4.1_02\jre\lib\rt.jar(java/io/FilterOutputStream.class)]

[loading E:\java\j2sdk1.4.1_02\jre\lib\rt.jar(java/io/OutputStream.class)]
[wrote HelloWorld.class]
[total 2784ms]

E:\java\projects\console>java HelloWorld.class
Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld/class
What does this mean? I've gotten this error a few times before... The class is taken straigt from a book, and is only supposed to do
System.out.println("Hello World!"); so i'm surprised it doesn't work...

Yes, i'm a noob... trying to learn java now :) Been doing visual basic for
ages...

Jul 17 '05 #2
Sorry... i feel silly... ;)

E:\java\projects\console>java HelloWorld
Hello world!
Dunno where the ".class" came from ;P It's 2:54am here... sorry :)

// Christopher

"Christopher Vagnetoft" <NO********@noccy.com> skrev i meddelandet
news:Yc****************@news2.bredband.com...
E:\java\projects\console>javac -verbose HelloWorld.java
[parsing started HelloWorld.java]
[parsing completed 380ms]
[loading E:\java\j2sdk1.4.1_02\jre\lib\rt.jar(java/lang/Object.class)]
[loading E:\java\j2sdk1.4.1_02\jre\lib\rt.jar(java/lang/String.class)]
[checking HelloWorld]
[loading E:\java\j2sdk1.4.1_02\jre\lib\rt.jar(java/lang/System.class)]
[loading E:\java\j2sdk1.4.1_02\jre\lib\rt.jar(java/io/PrintStream.class)]
[loading
E:\java\j2sdk1.4.1_02\jre\lib\rt.jar(java/io/FilterOutputStream.class)]

[loading E:\java\j2sdk1.4.1_02\jre\lib\rt.jar(java/io/OutputStream.class)]
[wrote HelloWorld.class]
[total 2784ms]

E:\java\projects\console>java HelloWorld.class
Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld/class
What does this mean? I've gotten this error a few times before... The class is taken straigt from a book, and is only supposed to do
System.out.println("Hello World!"); so i'm surprised it doesn't work...

Yes, i'm a noob... trying to learn java now :) Been doing visual basic for
ages...

Jul 17 '05 #3
Liz
instead of: java HelloWorld.class
try: java HelloWorld
"Christopher Vagnetoft" <NO********@noccy.com> wrote in message news:Yc****************@news2.bredband.com...
E:\java\projects\console>javac -verbose HelloWorld.java
[parsing started HelloWorld.java]
[parsing completed 380ms]
[loading E:\java\j2sdk1.4.1_02\jre\lib\rt.jar(java/lang/Object.class)]
[loading E:\java\j2sdk1.4.1_02\jre\lib\rt.jar(java/lang/String.class)]
[checking HelloWorld]
[loading E:\java\j2sdk1.4.1_02\jre\lib\rt.jar(java/lang/System.class)]
[loading E:\java\j2sdk1.4.1_02\jre\lib\rt.jar(java/io/PrintStream.class)]
[loading
E:\java\j2sdk1.4.1_02\jre\lib\rt.jar(java/io/FilterOutputStream.class)]

[loading E:\java\j2sdk1.4.1_02\jre\lib\rt.jar(java/io/OutputStream.class)]
[wrote HelloWorld.class]
[total 2784ms]

E:\java\projects\console>java HelloWorld.class
Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld/class

What does this mean? I've gotten this error a few times before... The class
is taken straigt from a book, and is only supposed to do
System.out.println("Hello World!"); so i'm surprised it doesn't work...

Yes, i'm a noob... trying to learn java now :) Been doing visual basic for
ages...

Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Matt | last post by:
I'd like to overwrite just one line of a binary file, based on a position set by seek(). Is there no way to do this? As far as I can tell I need to read the whole file, change the line, and write...
3
by: Anupam Kapoor | last post by:
hi all, a python n00b, so please bear with me. i have a simple question: i generally name python sources as a-simple-python-example.py. when i try to import a module named as above, i...
1
by: newgenre | last post by:
I am using a pre-built package of code for my site, which is called EasyDisc. All it does is it creates an interactive forum on your site, like any forum you see anywhere. I am having a problem...
1
by: David | last post by:
...i got this error: quote: ------------------------------------------------------------------------------ Access to the path "c:\inetpub\wwwroot\NewsServer\DBRelations\NewsServerBase.xml" is...
2
by: ducky | last post by:
Hi all, The only programming experience i have under my belt so far is VB. I'm just starting out on C++ and wonder if anybody suggests and good (free) starting points for me to get going. I'm...
4
by: onefry | last post by:
Hey I have this prog that i'm working on, starting my first c++ class and kind of a n00b to programming here it is #include <iostream> #include <cstdlib> using namespace std;
6
by: Charles | last post by:
I am learning from the Accelerated C++ book. The following example doesn't work and I don't know why: #include <iostream> #include <string> int main () { const std::string exclam = "!"; const...
8
by: HardHackz | last post by:
Hey, I'm trying to learn C++, the problem is, when I do cout << "Hello World!"; it always opens dos and closes it to quickly to see...i know im a total n00b, but any help?
0
by: hockeyjk | last post by:
All, I'm writing a program that creates a histogram of data. IDLE is freezing up after the window opens (doesn't prompt user or graph anything). The window that opens is named "tk" rather than...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.