[program-java] Eclipse: Creating a Package

  • From: "Corbett, James" <James.Corbett@xxxxxxxxxxxxx>
  • To: "Program-J (E-mail)" <program-java@xxxxxxxxxxxxx>
  • Date: Tue, 21 Oct 2008 11:52:43 -0400

Eclipse Creating a Package...

At this point of the excersise we can think of a package as just a folder.... 
Nothing more, nothing less! It contains files mostly with a .java extension.

If we follow the hierarchy that we have been using it might look something like 
this:

C:\work space\first_time\src\my_package....

...during the last instalment with the wizard, the src folder was created for 
us so don't be alarmed in the case you are thinking you've missed a step.

So in reverse engineering: a package is part of a project, and a project is 
part of your workspace.

So lets create a package....

1.      Open your project explorer.... Alt + w + v + p + enter.

2.      Expand the tree view so that the src folder is open....

3.      Again from the File\New menu option select Package from the sub menu 
choices....

4.      A new screen will appear and you are prompted for a package name.... 
Note, in the java language packages have lower case names and should reflect 
the purpose of the package. In our example we will use main....



James M. Corbett

GST Division (Micro Applications)
Acting CS3 IT Specialist / Acting Team Leader
(613) 941-1338

"I love deadlines. I like the whooshing sound they make as they fly by." 
Douglas Adams

"I'm Jim Corbett and I approve this message"

Other related posts: