aspose file tools*
The moose likes Beginning Java and the fly likes Noob needs help with Hello World Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Noob needs help with Hello World" Watch "Noob needs help with Hello World" New topic
Author

Noob needs help with Hello World

Charles Way
Greenhorn

Joined: Sep 19, 2011
Posts: 3
I am a complete Noob at programming who has decided to start with Java. I am trying to run the Hello World script as follows.



Every time I try I get the "Error: Could not find or load main class HelloWorld."
This is probably something very simple that I am overlooking. Any help would be appreciated.
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18977
    
  40


The class is named "HelloWorldApp" -- not "HelloWorld", as the error message implies that you are using.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Charles Way
Greenhorn

Joined: Sep 19, 2011
Posts: 3
Thank you.

That fixed it.

I did not notice, and please excuse my language. I forgot that I had added my own colorful spin when I copied the code.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39784
    
  28
Yes, this is a family website It is always before the 9pm watershed somewhere in the (Hello)world where somebody is logged on to the Ranch !

And welcome to the Ranch

Note I have edited your post, and you can see how much better it looks. For reasons explained here, you ought to use spaces, not tab characters, for indenting. Using a decent text editor (eg Notepad2, Notepad++ jEdit) instead of the editor that comes included with Windows® will make indenting much easier.
Charles Way
Greenhorn

Joined: Sep 19, 2011
Posts: 3
Thank you for the advice, and I will do my best to keep my posts family friendly in the future.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Noob needs help with Hello World