Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Build Path vs. CLASSPATH
Build Path vs. CLASSPATH [message #1219494] Wed, 04 December 2013 04:08 Go to next message
Eclipse UserFriend
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 10:33 Go to previous message
Eclipse UserFriend
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: Mon Apr 28 00:38:14 EDT 2025

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

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

Back to the top