What's the use of "Order and Export" tab in "Java Build Path" dialog box? By the name 'order', I can guess that JRE System library is searched before Plug-in Dependencies, but why do we have 'Export' in Build Path ? And what's it for the button left side of the elements?
It's the example that I borrowed from Eclipse distilled.
The orderes.webapp depends on orders, but it's likely to use the classes defined in ubl and catalog.
In such a case, orders can export catalog and ubl so that the packages that depends on it can use catalog and ubl.
And something more about "Order and Export".
.classpath
file to add exported=true
such as <classpathentry exported="true" kind="lib" path="lib/log4j-1.2.7.jar"/>
. In the Build classpath list, you can click the Up and Down buttons to move the selected path entry up or down in the build path order for this new project. Checked list entries are marked as exported. Exported entries are visible to projects that require the project.
Build path is used by the compiler to resolve dependencies and build a project. Classpath is used during runtime when running a project in order to find necessary dependencies. Build path is configured on the Java Build Path property page of a project.
In Eclipse select the web project and right-click Build Path > Configure Build Path. This will display the Java Build Path window.
The java output directories are configured via Project Properties -> Java Build Path. You can go to that page to see what folders are being currently used. Note that Eclipse java build does not generate a jar. It generates a directory of classes.
This tab seems to pull double duty (see bottom of this help page for small amount of detail).
On one hand, it functions as the order of resolution for resources used in the building of the project in question (the "Order" part). On the other, it also serves to define what parts of this build path are contributed to dependent projects' (those listing this project in the "projects" tab for their view of this preference panel) build paths (the "Export" part).
This latter function is why the checkboxes exist on the left hand side, as you ask (note that the '-' signs cannot be unchecked, as source files defined in this project cannot be deselected, as stated in help file). A dependent project that expects some resource from the contributing project will not compile/run if the contributing project doesn't export that resource.
EDIT: see this SO post for corroboration.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With