Question

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?

Was it helpful?

Solution

Can you generate the jar file both ways extract them and compare them. I am horribly curious if the jar file changed when you added the entry. Some information on class loading might offer some insight. The specification for jar files doesn't really offer any hints.

OTHER TIPS

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

One of them is for checking the sources/classpaths in the editor, the other is for the runtime environment.

I think.

What the hell, I'm maxed out today anyway.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top