• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Noob needs help with Hello World  RSS feed

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
author
Sheriff
Posts: 23588
138
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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

Henry
 
Charles Way
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Marshal
Posts: 60130
188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for the advice, and I will do my best to keep my posts family friendly in the future.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!