Eclipse has a Run Configurations screen with a Classpath tab.
I had some jars listed in the "user entries" section of this tab but my project did not run until I duplicated those jar files into the "bootstrap entries" section. After the jars were listed in both sections, the project ran successfully.
Why?
What's the difference between these two different categories of Classpath settings?
Go to Window-> Preferences -> Java -> Installed JREs and remove the earlier version of Java from there.
In Eclipse, you must set the classpath variables and configure the Eclipse Tomcat Plugin.
The. classpath file is used to record all the information of the project compilation environment, including: source file path, storage path of the compiled class file, dependent jar package path, running container information, dependent external project and other information.
The difference is the order of their specification in the classloaders.
The bootstrap classpath is managed by the top-level classloader when starting the VM that will execute the app. (From a commandline this is speicfied using -Xbootclasspath)
The user classpath are entries that are managed by the application classloader.
Any entries in the bootstrap classpath take precedence over the user classpath.
These are initialized based on the project containing the application to launch, but you can modify them in the launcher configuration for the application you wnat to launch in eclipse.
As to why it didn't work: what were the jars? Were they things that needed to be loaded from the runtime classes (like xml parser replacement libs?)
See http://java.sun.com/j2se/1.4.2/docs/tooldocs/findingclasses.html for more details.
-- Scott
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