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

  • SEARCH
  • Home
  • 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 8932245
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:17:35+00:00 2026-06-15T09:17:35+00:00

I have a Java console application that I am ready to deploy onto a

  • 0

I have a Java console application that I am ready to deploy onto a Unix server. I am writing a shell script to run the application.

I plan to put my shell scripts in one folder, my application jar and dependent jars (spring, etc.) into a different folder and properties files (those that need to be maintained ‘live’) in a separate folder again. I would then have my shell script iterate through the files in the ‘jars’ and ‘properties’ folders, appending them to the classpath, before finally calling java …

Is this a ‘good’ deployment structure? Are there any guidelines for how to arrange files to maximise maintainability and stability? Are there obvious ‘wrong’ ways to do this that are best avoided?

I should add that, for a previous project, I put all shell scripts (those that start java processes and those that don’t) into a scripts folder, my application jar into a folder with the library jars in a library subfolder and external resources into a config subfolder. I then wrote a script that explicitly loads all the files. It was long winded to write and needs to be maintained whenever I upgrade a library jar. This time around I’d like to do it better. Also, it feels unnecessary to separate my application JAR from the libraries.

  • 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-15T09:17:35+00:00Added an answer on June 15, 2026 at 9:17 am

    For what it’s worth, this is what we use;

    /
        /class
            //package hierarchy here, raw .class files
        /lib
            //library jars here, apache commons, gson etc, all .jars
        /conf
            //.properties files go here, including ones for libraries
        /doc
            //program documentation files, typically .txt
            /javadocs
                //java doc html root
        /sh
            //shell scripts including execute.sh and compile.sh
    

    We use ant for building, often have a src folder for the source tree if necessary. This way you just add /class and /lib to your classpath, and that never changes.

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

Sidebar

Related Questions

I have a Java console application that is launched from a batch script in
I have one application that prints messages from Test.exe in console .My java program
I am writing a multi-threaded java console application that I am intending to kill
I have created a java SE application that uses the mysql database using mysql
I have a multi-threaded Java application that will output information about a message it
I have a thread in a Java web application that causes a java.lang.OutOfMemoryError: Java
I have a simple console application that runs calculations in several threads (10-20 of
I have created a Java application that has 2 Jar files. Jar1 is used
I have a Java Web Start Application that I launch from live site by
i have a console application that generated from bison (a parser) and i want

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.