javaswinguwpdesktop-bridge

Can a Java Swing desktop application be converted to a UWP centennial app (AppX)?


I have been reading about project centennial (https://msdn.microsoft.com/windows/uwp/porting/desktop-to-uwp-root#preparing-your-desktop-app-for-conversion-to-uwp), and it occurs to me that there are many legacy line-of-business apps that are written in Java (not to mention Python/Tkinter, insert language/gui toolkit here, etc).

I can see a benefit in being able to market/distribute these through the Windows store (either internally for an enterprise or to the general public).

I was wondering if it is possible to turn a Java application into an AppX bundle (possibly using something like launch4j as an in-between step)?


Solution

  • It is possible, using Project Centennial. Just do the conversion process using the Desktop App Converter using your installer in silent mode and that's it.

    You can also use the installerless mode, just put everything (your app and jre) in a folder, create an exe which will call your java program, create your manifest and call makepappx. Everything is in the documentation. And the process is very similar to deploy java applications to Mac Store.

    UPDATE

    Due to the lack of information out there about packing Java applications for Windows Store, I created an simple skeleton using a demo app bundled in the JDK called SwingSet to ease a lot the process. Please check it: https://github.com/crramirez/uwp_bridge_java and contribute with your own needs to have a good starting point.

    I also published a Java application to the store, so this procedure works.

    Regards