I just downloaded Eclipse Java and am lookin开发者_StackOverflow中文版g 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
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.
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;
精彩评论