Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Crash And Burn on Hello World Tutorial(Multiple Markers at this line)
Crash And Burn on Hello World Tutorial [message #1691290] Sat, 04 April 2015 18:38 Go to next message
al co is currently offline al coFriend
Messages: 11
Registered: April 2015
Junior Member
How pathetic is this? Should I have done "Goodbye cruel world" app instead?

I used Eclipse in the past developing Java at a job and decided to spin the included tutorial to get back up to speed on the IDE.

After entering this:
public class HelloWorld {
System.out.println("Hello world!");
}


And clicking run, I got red underlines under second '.' and "Hellow world!"

With the tooltip red x saying: "Multiple markers at this line
- Syntax error on token ""Hello world!"", delete
this token
- Syntax error on token(s), misplaced construct(s)"
Re: Crash And Burn on Hello World Tutorial [message #1691296 is a reply to message #1691290] Sat, 04 April 2015 21:52 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4005
Registered: July 2009
Senior Member

I'm not sure which tutorial you mean, but executable code has to go inside of methods rather than just being jammed into the class body, as shown partway through http://www.coderanch.com/how-to/java/how-to-create-java-program . You might want to spend some time refamiliarizing yourself with the language.

Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Crash And Burn on Hello World Tutorial [message #1691299 is a reply to message #1691296] Sat, 04 April 2015 23:41 Go to previous messageGo to next message
al co is currently offline al coFriend
Messages: 11
Registered: April 2015
Junior Member
This is the one right in Eclipse Luna 4.4.2 You click the "create java project" and "Create your hellowworld class" and "Add a print statement" from the welcome tab:

Now that you have your HelloWorld class, in the main() method, add the following statement:
System.out.println("Hello world!");
Then save your changes; the class will automatically compile upon saving.

To run your application, right-click on your class in the Package Explorer and select Run As > Java Application. The Console view should appear at the bottom and display the "Hello, world!" output.
Congratulations! You have successfully created a Hello World application!

Why do you think a highly developed IDE would leave out such an obvious thing in their own tutorial?

[Updated on: Sat, 04 April 2015 23:42]

Report message to a moderator

Re: Crash And Burn on Hello World Tutorial [message #1691300 is a reply to message #1691299] Sat, 04 April 2015 23:45 Go to previous message
al co is currently offline al coFriend
Messages: 11
Registered: April 2015
Junior Member
Never mind, I overlooked a small but obvious part of the instruction:

"Enter HelloWorld for the class name, select the checkbox to create the main() method, then click Finish."

That will teach me to skim read, maybe.
Previous Topic:"create remote" repository ?
Next Topic:eclipse hyperlink not working
Goto Forum:
  


Current Time: Tue Mar 09 12:18:07 GMT 2021

Powered by FUDForum. Page generated in 0.03493 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top