-1

In the Eclipse Java Build Path wizard, what is the difference between the options given?

It seems as though Add JARs and Add Variable.. do the same thing. What do they do differently and when would you use them?

It would be much appreciated if someone can explain the function of each of the buttons in the wizard, as I have not found any such thing online or in the Eclipse literature surrounding me.

Eclipse Build Path Wizard

CodyBugstein
  • 21,984
  • 61
  • 207
  • 363
  • Click on them and you'll discover the differences. One allows to add a jar. The other allows adding a variable which references other jars. Click on the "Configure Variables" button in the Add Variable dialog box, and you'll have an explanation of what a variable is. – JB Nizet May 17 '13 at 15:42

1 Answers1

2

"Add variable" is used to add a JAR or directory at a location relative to a classpath variable that you have configured in your Eclipse preferences. I've used the facility when working with a team of developers sharing a related set of Eclipse projects via source control, where the projects rely on a set of JAR files on a network share that is mounted at a different location for different developers. Everyone sets the same LIB_HOME variable to point to where they have the shared folder mounted on their particular machine (e.g. L:\ on Windows, /Volumes/Libs on Mac, etc.), and the Eclipse projects then point to the required JARs relative to that variable.

Ian Roberts
  • 120,891
  • 16
  • 170
  • 183