Saurabh Tripathi
Saurabh Tripathi

Reputation: 105

Eclipse Helios: Java EE Perspective: How to have jars added to build path under one hood like referenced library

I have a GWT+Spring+Hibernate project and so I have several jars in WEB-INF/lib directory. All of these jars are added to build path. I get unconvenient view for jars in build path like

MY_Project
|->src
|->resource
|->JRE System Library[jdk1.6]
|->ant.jar   //from here on jars in build path
|->asm-common.jar
|->asm-util.jar
|->c3p0.jar
|->commons-collections.jar
 .
 .
 .

and this list goes on for 40 more jars here to cover up full screen length. Consequently I can't navigate to other dependent project easily.

I would like here something like what I get when I switch to spring perspective:

--------------------------------------------------------------------------------
MY_Project
|->src
|->resource
|->JRE System Library[jdk1.6]
|->Referenced Libraries //<-- here goes all that 40 jars under on hood
|->war
---------------------------------------------------------------------------------

So any suggestions.

Thanks in advance

Upvotes: 0

Views: 1283

Answers (2)

Rivendell
Rivendell

Reputation: 93

Try this:

  1. Switch to Package Explorer View (instead of Project Explorer View)
  2. If it doesn't show "Referenced Libraries" in Package Explorer View, click on the downward pointing triangle in the view and ensure "Show 'Referenced Libraries' Node" is ticked.

Upvotes: 0

Boris Strandjev
Boris Strandjev

Reputation: 46963

  1. Go to Window -> Preferences.
  2. There select Java -> Build Path -> User Libraries.
  3. Enter name for the library.
  4. Add all relevant jars.

From then on the library can be added for any specific project via: right click on your project -> Build Path -> Configure. Select Libraries tab -> Add Library -> User Library.

Enjoy!

Upvotes: 1

Related Questions