views:

42

answers:

2

I have configured my Eclipse to have a C:\Eclipse\external_libs directory where I place all my external libraries. In my case , my external libs are WATIJ, XMLUNIT, and XOM . Adding the external libs to the project is no problem... there is no question about that.

I also place my JDK at C:\Eclipse\Javasoft .

What I am wondering IS : is there a better location to place external libs? It's important to note that I like being able to pack my Eclipse directory into a zip file and move it and open it on another computer in a portable fashion.

+1  A: 

It's normally done on a per app/project basis. For java webapps you normally have your external libs in WEB-INF/lib. However, if you share the libraries across projects AND you need to zip your eclipse directory, what you're doing now is probably the best solution imo.

In linux you could add them to something like /usr/lib/share and include that in your classpath (but you couldn't zip it all up), but not sure if that sort of directory exists in windows.

Scobal
+1  A: 

If you do place all your library in an external folder, please use "**linked resources**" to avoid putting any fixed path in your .classpath file.

You can then reference that external directory from within your project, with a linked folder.

VonC