Hello,

Could you please assist me i want to deploy this application as an executable file with the MYSQL database embedded.

I have clean and build the application, the jar file is there but nothing happens. The database is stored on local host.

Thank you

No, you're not going to get that to work.
There are several important reasons for that:

  • there's no "executable"
  • there's no mySQL running on localhost on the machines you're deploying to
  • there's no such concept as an embedded mySQL database in a Java application
  • don't ever hardcode a database location and credentials in an application, which you almost certainly have done

Even i think that it is not correct to embed mysql.It it is regarding moving application from one system to another,you can use one criteria to create a batch file or something similar and that must execute the setup of mysql and then your java application.

Use H2 for your database. Problem solved.

I don't think I have express my problem correctly. Sorry about that. It is not embedded but is linked to a database(using JDBC driver).

The application is running perfectly fine on the computer and I deployed it on the same computer so local host database is still there.

localhost may be there, it's just the name for "this computer I'm myself". But if there's no mySQL installed on it, or no database with the name in the connect string, or no user with those credentials who has access to that database, you're still not going to get a connection.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.