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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T06:26:50+00:00 2026-06-13T06:26:50+00:00

I have a Java application (a quite large one with many external .jar dependencies

  • 0

I have a Java application (a quite large one with many external .jar dependencies as well as dependencies on images) and I need to package it up so that someone can double click to run, for example. Or something easy like that.

It uses Java Persistence, so it requires a sql connection which is specified in the Persistence.xml file in the Java Project.

How can I package this up? I was thinking:

  1. the installation process should validate that the user has MySQL installed and if not, direct them to install it
  2. the installation process could ask the user to enter credentials for any database and then I could update the Persistence.xml at run time

These were two ideas I had…but I wasn’t sure if there was a known solution to this problem. Any help would be much appreciated!

  • 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-13T06:26:51+00:00Added an answer on June 13, 2026 at 6:26 am

    I think you should take a look at embedded database solutions, like H2. Also, you can package your application using maven’s shadowing or jar plugin, having the jar-with-dependencies profile activated.

    This will nicely rid you of checking for database servers running on the client machine, and also will give you the proper means of bundling the application in one nice JAR, albeit a little large.

    Maven is a build ecosystem and toolset especially designed for building Java applications and executing the code — and generally doing whatever else you can imagine that’s possible to do with and to your code.

    It has a rich API for developing plugins and many developers have exploited this feature. There are numerous plugins for building — and launching — and packaging your application as well as helping you manage your applications dependencies.

    Maven’s shadowing comes in the form of maven-shade-plugin, available here. What it does is that it helps you create a single JAR file from all your dependencies. Also, there is the maven-jar-plugin which offers a profile jar-with-dependencies. It is also accessible from here.

    H2, on the other hand is a full-fledged RDBMS. This is the website: http://www.h2database.com/html/main.html, and here is a tutorial.

    You can find information on embedding the database here:

    • How to embed H2 database into jar file delivered to the client?
    • Embedding the Java h2 database programmatically
    • h2 (embedded mode ) database files problem

    I would also suggest you use a combination of H2/Hibernate/Spring which is a very easy setup and provides you with really rich features and an easy-to-use API.

    I hope this helps you 🙂

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

Sidebar

Related Questions

I have been working on a large java application. It is quite parallel, and
We have a web application (quite a heavy-weight one) that does a whole bundle
I have a Java application that run as a background service, i.e. no GUI.
I have a java application that people can log into (and do various things
I've been doing quite large application recently with Java - Swing. Now I'd like
We have a very large Java Swing desktop application comprising of a great deal
I have Java application, which, unfortunately, begins to consume quite big amounts of memory
My problem is I have a Java application that renders an image. Now I
We have a Java desktop application that accesses a Derby database located on a
I have a quite large codebase. In many places I have a piece of

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.