I'm currently investigating options for integrating TeaVM more tightly with OpenJDK, with the goal to make it easier and lower-friction for people to try TeaVM with their codebases.
jpackage has options for converting JARs into a platform-ready bundle, like an EXE or MSI for windows, a DMG for MacOS, or a DEB or RPM for Linux. These are specified via a "--type" command-line option.
jpackage supports specification of a main class with a main() method, with optional parameters, which fits nicely with TeaVM.
To increase TeaVM usage, it would be best for TeaVM to be bundled with jpackage in the OpenJDK. However, I think the licensing is incompatible. OpenJDK's GPLv2 (with classpath exception) is apparently not able to accept Apache v2-licensed code, like TeaVM. (per
https://en.wikipedia.org/wiki/Apache_License#Compatibility ) So unless TeaVM is relicensed to GPLv2 with classpath, or OpenJDK is relicensed to GPLv3, combining the codebases appears to be blocked.
Barring relicensing of TeaVM or OpenJDK, we need another option. One possibility is to have jpackage download TeaVM on the fly. Especially if cached, this seems feasible.
One more option is to require TeaVM be downloaded and installed somewhere. Perhaps jpacakge could search for it in the local maven cache. Other jpackage types have requirements that certain software be installed, but this will reduce adoption, so this should be our last resort.
If you've read this far, thank you! I think jpackage provides a good opportunity to increase TeaVM adoption, and increase the number of JVM developers deploying their code in the browser. After looking into more details and taking into account your feedback, I plan to take this to the OpenJDK mailing list, hopefully resulting in a JEP (Java Enhancement Proposal).