File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes Eclipse :: How to compile HelloWorld.java in it Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Eclipse :: How to compile HelloWorld.java in it " Watch "Eclipse :: How to compile HelloWorld.java in it " New topic
Author

Eclipse :: How to compile HelloWorld.java in it

Bansi Parimu
Greenhorn

Joined: May 23, 2005
Posts: 5
Folks,
Typed the hello World program and it compiles fine on a command line.
Now How do you Compile and run it in Eclipse. (mine is 3.0.1)

What I tried
1) (Little Green arrow )Run as > Java Application
Error : The selection does not contain a main type
2) Menu > Run > Run.. >
Perpectives
debug
Java
(Where do I specefy the path of my Javac in eclipse or something else needs to be done. )

I know its a very basic question. but if you can help that can be great

Thanks
Bansi
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30789
    
157

Bansi,
What you described in #1 is correct. Make sure that you selected the class in package explorer (the pane on the left) before selecting run. Otherwise Eclipse doesn't know what you want to run.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Bansi Parimu
Greenhorn

Joined: May 23, 2005
Posts: 5
Thanks it works
Also Had to select the java Configuration and the project and it was done

Thanks a lot
Regards
Bansi
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Eclipse :: How to compile HelloWorld.java in it