Java application and MySQL installation in a single package

前端 未结 2 1130
后悔当初
后悔当初 2021-01-01 01:55

How can I pack a Java application and MySQL installation files in a single exe file? Can I install the MySQL files automatically in background (or without any inputs from u

2条回答
  •  时光说笑
    2021-01-01 02:24

    Java is cross platform, MySQL isn't, so you'd have to create various installers for multiple platforms with different MySQL binaries. If you want to include MySQL source code for non Windows systems, then that's another story... so I assume you want just an installation for Windows.

    First of all, get an installation software that you'll feel comfortable with. There is a nice list of free and non free installers on Wikipedia.

    Second thing, you can do a silent MySQL installation. How it's done is explained here.

    But note that doing a silent MySQL installation without user's permission doesn't sound too good to me, since MySQL isn't exactly lightweight software and you might mess up something if a user already has MySQL somewhere installed.

    So, by doing this, you have to be extra careful to check if port 3306 is already up and running (default MySQL port), and other sanity checks to see if there's a possibility of another instance lurking in the background.

    It would be better if you at least informed your user that MySQL will be installed. Think about these details, because they might be dealbreakers so some of your users.

提交回复
热议问题