Concept---classpath
The class path is a list that contains the path (directories) and the jar package. Used to form an application. You can usually use the environment variable classpath, or the command line-CP specify
So how do you understand Eclipse's build path?
First, it is important that Eclipse does not use the classpath of environment variables, but rather uses its own set of rules to identify the classes list. Eclipse is Compile to the class path of compile time and runtime (runtime), in the concept of Eclipse, classpath refers to the runtime's class list, BUiD Path refers to the class list at compile time. The default, class path and build path are managed by the Eclipse's build path ( Specifically, the managed build path, which affects Eclipse's classpath. The runtime's classpath, which is actually Eclipse's run as, generates a lanch configuartion load configuration. It will specify Classpath). Right-click Project----Build path.
The Build Path tab (TAB)---- primarily compile-time
tab name |
Describe |
Source |
Tell the Java compiler (source code) your source code location, and here you can control the output path |
Projects |
The class of Project X will be used at run time and compile time for other Project X since the current project. Note that, at development time (develop time), project is not packaged as a jar package, to save a few minutes. |
Libraries |
This is more complex than the code used to refer to non-Eclipse projects (project), where the famous maven affects the external dependencies of Eclipse. |
Order and Export |
If other projects since this project, then configure here to expose those symbols (symbols) |
Each time you run your program, how do you configure the parameters of the VM and the main class, as well as some other parameters of the command line. Then the launch configuration is used. Menu Run---Select or create a launch Configuration
So how do you specify the class path for eclipse?
The Launch Configurations tab---- primarily the classpath and configuration of the runtime.
tab name |
Describe |
Main |
Specify which project and main Class to run |
Arguments |
Parameters of the program main function, Java VM parameters |
Jre |
Specifying the Java version |
Classpath |
The point has come, to run the jar package and classes |
Source |
Specifies the source code (source code) location inside or outside the workspace. |
Environment |
Passing environment variable parameters |
Common |
Other options |
Understanding of Eclipse Build Path