How to create installer once finished with Java Desktop Application with MySQL DB?

后端 未结 3 666
谎友^
谎友^ 2021-02-09 00:28

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

3条回答
  •  青春惊慌失措
    2021-02-09 01:06

    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.

提交回复
热议问题