What is the use of Order And Export tab in Java Build Path
What is the use of Order And Export tab in Java Build Path
Asked Answered
https://mcmap.net/q/340677/-the-quot-order-and-export-quot-tab-in-quot-java-build-path-quot –
Peanut
It allows you to do two things:
- Determine in which order projects and libraries appear in the classpath. If there are any duplicate classes, this determines which version is loaded
- Determine which projects and libraries will be exported and thus available in other projects that depend on this one.
In Eclipse, I have a project TEST which is dependent on Project TEST2 and an externat jar external.jar. While creating jar for TEST Project with Order and Export option checked , created jar is not including TEST2.jar or external.jar.. So how I can do this to run the TEST.jar idependently ? –
Mcmath
@Dhrubo: JARs cannot include other JARs. I think you can configure the JAR builder of eclipse to include all the classes, but the normal way to do it is to have several JARs and include them all in the classpath when running the application. –
Kavita
what difference 'checking and unchecking' a particular entry makes? –
Roy
@Darpan: only checked ones are visible to dependent projects. –
Kavita
blue dot before library name ? –
Moral
@TusharPandey: I think that happens only for the project's own source folders, which are always exported. –
Kavita
Got some hint here for you:
Order and Export. Order in which projects and libraries appear in the build path and the default runtime classpath; e.g., use classes from a workspace project before using the same classes from an archive library.
Found it on informit.com
Specifically, the classes higher in the list will take precedence over the classes lower in the list. –
Dhoti
© 2022 - 2024 — McMap. All rights reserved.