JavaBeat
Eclipse Home Articles Tutorials Java Interview Questions & FAQs Java QnA Code Junction

Next : Import third party JARs

Create source folders


Switch to the "Source" tab in the Properties dialog.



Eclipse projects can contain one or more source folders which contain Java source files. By default, the project directory itself is the only source folder.

Using multiple source folders is a good way to separate different types of code. This can make your project easier to work with and simplifies the Ant build scripts which we'll write later. We're going to set up separate source folders for application code and unit test code.

Click on "Add Folder" and type "src":



Click "Yes" when prompted.



Click on "Add Folder..." again and then "Create New Folder...". This time, call the folder "test". Click "OK" twice.

You'll see that we now have two source folders:



Clicking on "Order and Export" shows you the complete classpath used for compiling any Java source files in the project (we haven't created any source code yet!).

The classpath currently contains the two source folders plus the JRE:

.

Output folder

When you use custom source folders, the compiler stores the generated class files in a separate folder called the "output folder". As you can see from the dialog above, the output folder is set to a "bin" subdirectory under the project. Leave this setting alone unless you have a good reason.

Note that you won't see the bin subdirectory or class files in the Package Navigator by default. Switch to the Resource perspective to see an unfiltered view of all project files and directories.

Sponsors
Webmaster Hosting Forum
Java Jobs
MyVideoLib
India News
Internet Advances
Latest QnA
SCJD Tips
When we start a thread by applying start() method on it ,how does it knows that to execute run()method?
About Wrapper class in Java
How to configure weblogic 7.0 in MyEclipse?
Static Block and Static Initializer in Java

JavaBeat Media (2004-2008), India
javabeat | planetoss | links directory | advertise
Copyright (2004 - 2008), JavaBeat