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

后端 未结 3 634
谎友^
谎友^ 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:18

    1. Yes. You can use some setup builder, like InnoSetup, for example. Personally, however, I like giving my customers a zip file, which they extract wherever they like. The executable jar should be able to handle everything by itself (I like it where there is no need to install the software, just unpack and run).
    2. If it is hardcoded, then yes (but, what do you mean by hardcoded? path to file? ip address?). You should use properties or configuration files for paths and other external things your software depends on. The software should read from those files. Upon startup check for presence of such file(s) - if missing, the user should be shown a window in which the config can be entered.

    As for deploying MySQL with your code - consider using a server for that, so that your users are not forced to install MySQL, instead they connect to it over the net. If you need the database only for storing data locally, why not using SQLite or a similar, file-based db engine?

    The above answers are just suggestions and more-less reflect the way I am thinking. I would be happy to hear from someone with more experience. Nonetheless, I hope the answers help a little :)

提交回复
热议问题