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 7807025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:43:20+00:00 2026-06-02T02:43:20+00:00

I’m just trying to get my Java lib folders organized (using NetBeans). What I

  • 0

I’m just trying to get my Java lib folders organized (using NetBeans).

What I want to have is something like this:

unknownNetworkDriveOrUncPath:\java\commonlib\
                                   |-- fileio.jar
                                   |-- ...

unknownNetworkDriveOrUncPath:\java\program1\
                                   |-- lib\
                                   |-- program1.jar

unknownNetworkDriveOrUncPath:\java\program2\
                                   |-- lib\
                                   |-- program2.jar

The lib folders inside the program folders contain specific jars. The commonlib folder contains jars every program may use.
So program1 should have access to its own lib folder and the common lib folder. The same goes for program2.

Best way would be to have the same structure within the dist folder after compiling. Then it would be possible just to copy the files to the desired location. But I don’t know how to do that.

Is there a “best practice” solution on how to configure NetBeans? I can’t use absolute or UNC paths since the network drive may differ.

Thanks in advance.

Regards.

  • 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-06-02T02:43:22+00:00Added an answer on June 2, 2026 at 2:43 am

    What you’ll probably want is to modify the build.xml file which is present in your project directories. Netbeans uses Apache Ant as the tool which executes the build process. Ant is an XML based script. It’s split into multiple files in Netbeans but the only one you should modify is build.xml.

    Read the comments in this file. They suggest that you should override certain targets to adjust the build process to suit your needs. For example we use the “-post-jar” target to create the entire install directory of our products inside the “dist” directory. As for non-absolute paths, I don’t think you’ll be able to achieve that but you can copy stuff to locations relative to your project directories. I would be entirely possible to have a common dist directory for multiple Netbeans projects.

    The following would probably (haven’t tested it) copy your project’s JAR to “commonBuildDir” directory which should be located at the same level as your project directories.

    <target name="-post-jar">
        <property name="common.build.dir" location="${build.dir}/../../commonBuildDir"/>    
        <copy todir="${common.build.dir}" preservelastmodified="true">
                <fileset file="${dist.jar}"/>
        </copy>
    </target>
    

    ${build.dir} references an Ant property, in this case a predefined one which points to the build directory of the project. Same goes for ${dist.jar} which references the location of your project’s JAR file. Behind the sceenes these are all absolute paths if I remember correctly.

    Customizing Netbeans Build Script

    Ant Tutorial

    I think this should get you started to customize your build process the way you wish.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have thousands of HTML files to process using Groovy/Java and I need to
I have some data like this: 1 2 3 4 5 9 2 6
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this

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.