I imagine some Java gurus with experience delivering Java apps on Windows desktops will be able to ace this one. I've always been a Mac/Linux Java developer so this is uncharted territory for me :-/.
I have to write a Java 8 Swing application and install it on a Windows 10 (64-bit) machine. My gameplan is to package the app as an executable JAR and wrap it with Launch4J, so that it looks like a native Windows EXE (.exe file). However its a little bit more complication than that when it comes to the distribution:
- There will be the JAR/EXE as mentioned above, lets call it
myapp.exe
(built frommyapp.jar
) - The app will output logs to a (local?) directory,
myapp.log
- The app will load a config file at runtime,
myapp.properties
- The distribution should also contain the User's Guide,
MyApp User Guide.html
Let's assume a Java 8 JRE/JDK is already installed on the machine, so we don't need to worry about installing Java itself.
The installation process must be simple and include:
- Removing the old version (and all of its other artifacts such as the log file, config/properties file, user guide, etc) off the machine completely
- Installing the new version at either the Windows 10 default location, or allowing the user to specify a different location
Additionally, if at all possible, I'd like the installation process to include:
- A requirements check for things like minimum memory and disk space, OS version info/compatibility (i.e. make sure its being installed on Windows 10, etc.)
- Provide an easy-to-use wizard such as an MSI that the user can click though
- Optionally install shortcuts to the user's Desktop
Given all this, I'm wondering what my options are in the modern Windows 10/Java/Launch4J landscape. Are there tools that will help me script together MSIs quickly, or do I have to write my own in, say, C#/.NET and have that be a separate binary/project? If MSIs aren't an option, what options exist that might hit all my bullets above?
I realize I could just distribute the whole thing as a ZIP, and have the installation process look something like:
- Save the ZIP to some place on the user's machine, say, the Desktop
- Move the previous app and its artifacts to the trash, manually
- Unzip the new ZIP
However that feels janky and I'm looking for something more professional. Any solutions here?