0

Similar questions have been asked but I still don't know/understand the answer. When adding a reference to a .jar in an Eclipse Java project, what is the difference between "Add JAR" and "Add External JAR"? I understand that the former is usually used for JARs built from other projects in the Eclipse workspace, but what is the difference between the two from the perspective of the referencing project?

Also when I click "Add Jar" and choose another project in my workspace that exports a .jar file, I don't see the .jar file in the file system GUI so I can't select it. In the screenshot below, I want to reference MiscUtils.jar in the MiscUtils project. The .jar is definately in the "bin" directory but it doesn't show up in the UI.

Thanks!

Eclipse IDE screenshot

1
  • type MiscUtils.jar in filter. If you don't see any entry that means jar does not exist. Commented Aug 30, 2012 at 13:52

2 Answers 2

1

"Add jar" is to add a jar that is in the current project tree, so the UI shows only subdirectories of the project. "Add external jar" is to add a jar that can be located anywhere, so in this case the UI allows you to browse any folder on any available drive.

Sign up to request clarification or add additional context in comments.

Comments

0

what is the difference between "Add JAR" and "Add External JAR"?

--> With Add External JAR, You can add jars from outside project, keeping out of your project workspace. With Add Jars, you can add jars from projects available in your current open workspace.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.