Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Tell Eclipse to Include Standard .jar Library for All Projects

Tags:

java

eclipse

jar

I realize that in eclipse you can specify certain .jar libraries to add for individual projects, but I was wondering if it was possible to make it such that eclipse automatically adds standard .jar's to the classpath for all projects. I'm using eclipse for a java course and would like to be able to automatically use the course's stdlib for all projects.

like image 410
themaestro Avatar asked Feb 06 '11 04:02

themaestro


2 Answers

Under Window -> Preferences -> Java -> Installed JREs find your default JRE (the checked one) and hit Edit. Add jars that you want.

like image 180
Konstantin Komissarchik Avatar answered Sep 28 '22 07:09

Konstantin Komissarchik


By default, if it's a java project then eclipse includes required jar files, but in addition if you need more jars then you could create user libraries by

Window - Preferences - Java - Build Path - User Libraries.

rather mixing JDK jars with user libraries.

like image 39
Phani Avatar answered Sep 28 '22 06:09

Phani