I have finished writing a Java Desktop application with a mySQL database. I want to make the application run outside netbeans and let it be installed on other computers. I know
1) Is there a way I can create a setup file that also installs the database and the application together?
See my answer to Java based Standalone application.
2) Also my database path is hard coded, does that mean I have to change the code every time I install my application for someone, what is the better way to do that?
Have the DB installer pop a JFileChooser
to ask the user where they want to install the DB. Store that path using the JNLP API PersistenceService. Here is my demo. of the PersistenceService.