Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 712429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T04:50:50+00:00 2026-05-14T04:50:50+00:00

I’m trying to find the best way to use Java libraries that were installed

  • 0

I’m trying to find the best way to use Java libraries that were installed by the package manager instead of just putting a copy into ${project.root}/lib

My distro, Gentoo, has a package for Java libraries like jdbc-postgresql.
It’s installed to /usr/share/jdbc-postgresql/lib/jdbc-postgresql.jar

I assume that this path may be different in Ubuntu, Fedora, or Arch.
Is there any way to do like what C does? Where you just add a -lfoo, and the linker would find libfoo.so.

I’m using Ant 1.8.0 and Java 1.6.0_19.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T04:50:50+00:00Added an answer on May 14, 2026 at 4:50 am

    Maven and Ivy both do something similar but in the end you still end up with jars added to the lib folder of your application.

    Also you would loose control over the versions of your jars your application will use runtime. If an update to your distribution changes these jars your application could fail from changing API signature. Deploying on computers other than your own could also pose problems to locate these jars. Lastly if your application uses many jars you could have problem creating a classpath reaching the limits of what can be stored in an environment variable.

    I do not know if there are such systems available for jars as building a lib folder is the approach most used, simple, safe with the light disadvantage to duplicate jars for each applications. This said disk space is cheap and jars rarely peak higher than 1 meg so it is minor.

    This being said you could create an extention to Ivy for example that would make your system a repository, then the build process would copy the jars from the different locations in your system to the lib folder of your project thereby bypassing the classpath limits. The plugin could learn the location of the jars by using the package manager’s database if available, you could discover versions as well fro the same source. This way you would support customized locations so long as the manager was used to install the jars.

    That would be my first avenue of investigation to solve this if I had time and energy.

    This being said I still wonder if the investment would yield sufficient return rather than just copy the jars. You are better judge than me to evaluate this for your own needs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 345k
  • Answers 345k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Check out the docs for the do 'function'. In there,… May 14, 2026 at 5:53 am
  • Editorial Team
    Editorial Team added an answer This property cursor:none; isn't part of the standard See here… May 14, 2026 at 5:53 am
  • Editorial Team
    Editorial Team added an answer You could try using Fiddler - a web debugging proxy… May 14, 2026 at 5:53 am

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I want use html5's new tag to play a wav file (currently only supported
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I've got a string that has curly quotes in it. I'd like to replace
In order to apply a triggered animation to all ToolTip s in my app,

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.