What is the difference between the Project view and the Source view? What directories should I add to the Project view and which ones to the Source view?

Eugene Belyaev

If your project contains Java source files, then you should add root directories corresponding to the default (unnamed) packages containing those files to the sourcepath.

For example if your class com.mycompany.mytool.MyClass is located in the "myproject/src/com/mycompany/mytool" directory, then you should add the "src" directory to the sourcepath. This way IDEA "knows" where it's supposed to find other classes given their fully-qualified names.

Project paths include any directories that contain files you intend to work with in your project. For example, you may add the "myproject" directory from the example above, so you will be able to browse various files, not only those located under the "src" directory.

The sourcepath may also contain paths to source files of any third-party library if you want to have those sources available for browsing.

Please also note, that different project-wide operations like compiling project, searching for usages and other will be performed on the files under the project paths only.

Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact