Ben
Ben

Reputation: 62356

How to tell eclipse java what to run

I just downloaded Eclipse Java and am looking to finish my hello world tutorial but I'm not sure what packages to include in my app and Eclipse doesn't like that I don't have any packages specified. Any advice?

tutorial link:

http://download.oracle.com/javase/tutorial/getStarted/application/index.html

Upvotes: 0

Views: 191

Answers (2)

Tommi
Tommi

Reputation: 8608

Right-click on the src folder of your project and choose to create a new package. Give the package any name you want, for example webnet.helloworldapp. Then move your existing sources under that package with the Refactor --> Move command, or just manually add the following line to the files:

package webnet.helloworldapp;

Upvotes: 0

Nishant
Nishant

Reputation: 55856

Look into this Hello Eclipse example. It tell you how to code in Java using Eclipse (including creation of package and running it). Also, how to run the code from out side the Eclipse.

Hope this helps.

Upvotes: 1

Related Questions