[program-java] Re: Eclipse: Creating a Class

  • From: "Corbett, James" <James.Corbett@xxxxxxxxxxxxx>
  • To: <program-java@xxxxxxxxxxxxx>
  • Date: Thu, 23 Oct 2008 08:02:21 -0400

Yup, ALT + W + V + P + ENTER.... which will place you in the treeview of the 
Project Explorer.

Jim 

-----Original Message-----
From: program-java-bounce@xxxxxxxxxxxxx
[mailto:program-java-bounce@xxxxxxxxxxxxx]On Behalf Of Pamela Mast
Sent: October 22, 2008 2:58 PM
To: program-java@xxxxxxxxxxxxx
Subject: [program-java] Re: Eclipse: Creating a Class


Hi Jim,

I also am a beginner with Eclipse, and beginning to use Java and JSP in my 
project.
Question:
Is there a keyboard command to get from the Class that was just created to 
the Project Explorer?
If not, then how do I get from where I currently am after creating the Class 
to the Project Explorer?


Thanks, and keep up the good work,
Pamela

----- Original Message ----- 
From: "Corbett, James" <James.Corbett@xxxxxxxxxxxxx>
To: "Program-J (E-mail)" <program-java@xxxxxxxxxxxxx>
Sent: Tuesday, October 21, 2008 12:13 PM
Subject: [program-java] Eclipse: Creating a Class


Eclipse: Creating a Class

Ok, so far we have created a workspace, and a package.... In the real world 
of Java, we haven't accomplished much. In fact, all that we have done is 
useless.

Therefore, lets make this thing a thing....

Therefore, we are going to create a class.... A class is a template for a 
thing.... A thing is an object and objects have attributes and properties.

1. Again, from the File\New\ menu, select Class....

2. A new screen will appear and you are prompted for a name for your 
class... In the java language all classes start with a capitol letter so in 
our example we will call it Main... Note the capitol M.

3. Since our example is of a MVC (Multi View Controller we have a start up 
class Main which will be in the package main with a lower case m....

4. In order to denote this class as our main start up we must first add a 
few things:

5. Once you have entered the class name, tab until you reach "public static 
void main (String[] args)" and select the check box....
Continue tabbing until you locate the Finish button.

6. If you view your project explorer and note that the class file is not in 
the main package, you can right click the file, locate Refactor\Move and 
then move the file into the corresponding package.



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: