Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » How should I use classpath variables?
How should I use classpath variables? [message #198344] Thu, 10 March 2005 20:00
Eclipse UserFriend
Originally posted by: wharley.bea.com

I'm trying to access an external jar file (tools.jar, from the 1.5 JDK),
that may be in different places on different machines. My thought was to
define a classpath variable pointing to it, rather than hard-coding the
location.

However, what I find is that when I use a classpath variable, my build
succeeds but I cannot instantiate classes at runtime; if I hard-code the
location instead (with no other changes), everything works fine.

Q1: Am I doing something wrong? Or do classpath variables only work at
build time, not runtime?

Q2: Where can I learn more about what classpath variables are good for and
how they should be used? The Eclipse documentation on this is very sparse.

Q3: What is the right way for a plugin to add a (dynamically discovered) jar
to its classpath at runtime?

Thanks!
Previous Topic:Reusing JDIDebugModel outside of Eclipse
Next Topic:Using JDT outside the eclipse platform
Goto Forum:
  


Current Time: Wed Apr 30 17:47:00 EDT 2025

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

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

Back to the top