I have developed a desktop application in java using netbeans and Mysql as my DB.
How can I create an .exe file including the database so that it that my application could be executed on other device?
I have developed a desktop application in java using netbeans and Mysql as my DB.
How can I create an .exe file including the database so that it that my application could be executed on other device?
Starting with MadProgrammer's quote:
AFAIK MySQL is database server, meaning it doesn't operate in standalone mode. This would mean that you would need to install MySQL on your target machine - which kind of seems counterintuitive. If you want a standalone database, then maybe h2 would be a better alternative, it's a pure Java SQL database system, which doesn't require any additional installation
The simplest option is to use an internal DB, so that every resources will be bundled into a single application.
Otherwise - How can handle the external DB related issue (it being an application running alongside your java application)?
By creating a dedicated installation flow (running dedicated scripts which will install required 3rd party solutions prior to allowing your application to be executed):
As for having an .exe executable for your java application - see the references I have provided. A 3rd party tool should easily create a .exe that will suite your needs.
A batch file which encapsulates the java -jar ...
command can also work.
References: