Reputation:
Project is Developed in Netbeans IDE in Java Language. Database connected to it is MySql that runs using Xampp. The project is complete. Now I want to launch it. I do not know.. 1. How to create the setup which will install this project on clients Windows. 2. How this setup will use the database that I have created and Install it on clients PC. 3. How the database will start automatically on his PC as on my PC I have to run Xampp manually first in order to make connection through code with project.
I have tried using clean and build but when I run that result file it waits for a second and then nothing happens.
Nothing appears on screen when I run build file unlike when I run my project in Netbeans. How to solve this issue?
Upvotes: 0
Views: 663
Reputation: 1052
The database and xampp are two different things. Xampp provides a database (MariaDB if im not wrong) and thats all. Java doesn't create "installable" outputs. it creates a jar which can be run with java (something like java -jar your-jar.jar )
So for your setup you can either install xampp and use its database or install a database as a standalone service and use it. The boot with the system depends on the database but xampp is the easiest as you have to boot the db when xampp opens and you can put xampp to open when windows startup.
As for the jar file it depends on what your program does. Is it a service? then it needs to start-up on its own and you will need to provide a service for windows. Is it an app that a user will run? Create a wrapper or a configuration that will setup the system to run jar files with double click as the user shouldn't need to learn java -jar the-jar.jar ( have a look at this Running JAR file on Windows )
Lastly about the db / java connection. If your program does not require the database to start up then try to "Delay" the call until its needed. Else you will need to create a retry logic to try and connect to the database after a failure instead of failing the program.
I hope that helped!
Upvotes: 1