my dog learned polymorphism
The moose likes IDEs, Version Control and other tools and the fly likes Eclispe and classpath Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Eclispe and classpath" Watch "Eclispe and classpath" New topic

Eclispe and classpath

john sayeau
Ranch Hand

Joined: Aug 23, 2010
Posts: 33
Does anyone know how to set my classpath globally (for all projects) on eclipse?
I know how to do it from the os and then use the jdk to compile but I'd like to not have to set it up on every eclipse project.

I'm going through a text book that uses the same classes regularly and I 'd like to not have to add the build path to each project individually.

I tried Eclipse>preferences>Java>build path and it asks for a variable name. I'm not sure what it wants exactly. Tried a couple things... no go.
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33113

A variable is used to abstract from the absolute path but doesn't help with accessing multiple jars.

Are the common classes all in the same jar/project? If so, you can point to that from each project. If not, can they be?

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
john sayeau
Ranch Hand

Joined: Aug 23, 2010
Posts: 33
What I do at the project level is right click the project>>properties>>configure build path>>add class folder>>create new folder>>advanced and then select the folder where the namespace path starts.
In this case it's net/mindview/util. This allows me to import the namespace to my classes.(hope my terminology is correct)

What I want is to do the above globally, somehow, so I don't have to do it for every project that needs it.
I agree. Here's the link:
subject: Eclispe and classpath
It's not a secret anymore!