Daniel
Posts: 8237
Joined: Mon Apr 02, 2012 1:11 pm
Contact:  Website

Package java application into an MSIX setup for Windows

Wed Aug 31, 2022 9:18 am

Hi,

Hereby I want to expose how easily you can create an MSIX setup for your java application by using Advanced Installer tool.

One of the main challenge when you want to deploy your java app through an MSIX package is to make sure you include all of your java app dependencies in the MSIX package.

The main dependency of each java app is the Java Virtual Machine that runs your java application (that gets installed/deployed by using the JDK or JRE). Now when it comes to package the JVM alongside your java app in an MSIX build this is fairly simple. You should just make use of our "JRE Bundle" feature.

Here are the steps you can follow to implement this scenario:

1. on your build machine make sure you install the JDK (e.g. install JDK v18 64-bit architecture)

2. open Advanced Installer and create a new "Professional" project type
screen1.jpg
screen1.jpg (146.01KiB)Viewed 81975 times
3. go to "Files and Folders" page and add your java app files in there

4. go to "Java Products" page and define your Java Product using the [New Java Product] toolbar button
screen2.jpg
screen2.jpg (266.52KiB)Viewed 81975 times
5. select the "Settings" tree node and click on the [Add JRE bundle"; select the "Platform" to "64-bit JRE" and in the "Folder" field pick your JDKv18 installation folder:
screen3.jpg
screen3.jpg (257.11KiB)Viewed 81975 times
6. go to "Builds" page and add a new "MSIX/APPX" build

7. go to "Digital Signatures" page, check the "Enable signing" option and configure a certificate to be used for signing your setup package; if you do not have a signing certificate, then you can create a test certificate by using the [Create...] button

8. build your MSIX build and test its installation

Attached you can find a download link for a sample setup project created with Advanced Installer 19.8.1 that implements the above settings. The sample project builds an MSIX and an MSI package type too.

Sample Project download link

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

rladstaetter
Posts: 11
Joined: Fri May 06, 2022 1:15 pm

Re: Package java application into an MSIX setup for Windows

Thu Oct 06, 2022 8:29 am

Thank you for this tutorial!

Catalin
Posts: 6506
Joined: Wed Jun 13, 2018 7:49 am

Re: Package java application into an MSIX setup for Windows

Thu Oct 06, 2022 9:57 am

You are always welcome!

We are glad you found this article useful.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Sample Projects”