Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Build Path vs. CLASSPATH
Build Path vs. CLASSPATH [message #1219494] Wed, 04 December 2013 09:08 Go to next message
Ratna Lein is currently offline Ratna LeinFriend
Messages: 1
Registered: December 2013
Junior Member
Hallo everyone,

it is actually a very simple issue.

I have spent hours to understand the concept of build path and classpath under Eclipse.

We can configure the compile build path via Project --> Build Path --> Configure Build Path --> ...

We can configure the run time classpath via

I am looking for an example, where the build path and classpath are defined DIFFERENTLY.

Has someone any example or explanation in which cases it is wise to have the build path and classpath defined DIFFERENTLY?

Thank you for your help.

Regards,

Ratna Razz

Re: Build Path vs. CLASSPATH [message #1219551 is a reply to message #1219494] Wed, 04 December 2013 15:33 Go to previous message
David Wegener is currently offline David WegenerFriend
Messages: 1445
Registered: July 2009
Senior Member
The build path only needs to include elements (classes, jars, etc) needed to build your project. The classpath used when launching your application may need to contain other elements in order to properly run. For example, you may have resource files that need to be loaded but aren't required at build time. You may also use frameworks that are accessed by interface and have different implementations. When building your project, your code only refers to interface classes. At runtime the framework may then load classes based on configuration files or other class path lookup techniques. In this case you might need to add additional entries to the classpath. The build path will likely be a subset of the classpath.
Previous Topic:Maven for Eclipse
Next Topic:Transitive dependencies in target platform are not resolved when running JUnit Test (not as plug-in)
Goto Forum:
  


Current Time: Tue Apr 23 11:44:27 GMT 2024

Powered by FUDForum. Page generated in 0.03648 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top