tags:

views:

93

answers:

2

Hi,

I have been working on Eclipse recently. I am fairly new to java programming, so this question might seem novice to some. I have been working on projects which have references to many other projects. So, when I create the project in my eclipse environment, it shows errors on many places, as I believe it is not able to pick-up all the jars for all the referenced projects automatically. I found out that all those referenced-jars of referenced projects are on my box in a savant_repository. In fact, my projects gets build and runs fine from my command-line environment, but eclipse throws errors. So, here's the question, is there a way I can always make all the projects that I create in eclipse IDE, look for referenced jars in that repository?, or do I need to explicitly add all the referenced jars one by one, which would definitely be painful.

+1  A: 

Within Preferences have a close look to 'Java > Build Path'. You can define Classpath Variables and User Variables so that they point to / include your standard libraries. You will still have to add them to your projects but at least it can ease the pain.

Andreas_D
+1  A: 

In addition you can also:

  • create a 'User Library' (Java/Build Path/User Libraries) with all your class files and add it to every project you need it
  • modify your the (Installed) JRE Settings (Java/Installed JRE) for your used JRE Environment. just press edit and add your jars.

personally i would recommend the usage of 'User Libraries' or the already suggestet solution via variables.

flo