IDEA中classpath

First, open the project window opening File-> Project Structure ..., to give project structure shown below:

 

All code source file directory Source Folders represented generated class file is output to the target-> classess folder, but inside the source files are not copied to the target-> classes folders, Test Source Folders are represented test code source file directory, which generates the same class file is output to the target-> classess folder, and inside the source files are not copied to the target-> classes folder.

The Recource Folders are indicated resource file directories, these directory files are copied code is compiled to run directly into the target-> classess folder. target-> classes is the classpath , any resources we need to get in the classpath prefix must be found in the target-> classes folder, java.io.FileNotFoundException otherwise an error message will appear.

    If you want to add some of your own directory to the directory categories such Source Folders, Resource Folders years to achieve after compile correctly file output, you can click on the file you need to set the folder, and then Make as above the file structure of the window: behind choosing the right directory type can be.

Guess you like

Origin www.cnblogs.com/lcx20190724xxz/p/11237115.html