What is the use of Order And Export tab in Java Build Path
Asked
Active
Viewed 2.0k times
2 Answers
33
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.

Michael Borgwardt
- 342,105
- 78
- 482
- 720
-
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 ? – Dhrubo Apr 19 '12 at 04:59
-
@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. – Michael Borgwardt Apr 19 '12 at 07:04
-
-
@Darpan: only checked ones are visible to dependent projects. – Michael Borgwardt Apr 07 '14 at 12:11
-
-
2@TusharPandey: I think that happens only for the project's own source folders, which are always exported. – Michael Borgwardt Nov 06 '14 at 11:21
4
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

lunactic
- 316
- 1
- 5
-
3Specifically, the classes higher in the list will take precedence over the classes lower in the list. – xji Jan 11 '16 at 13:08