0

I build web apps professionally with Spring Boot & Angular. For some pet projects however, I would like to avoid the (costly) hassle of the DevOps & hosting of such projects.

I know some JavaFX and have taken interest in native images. I tried for some evenings now to setup a [Spring Boot + JavaFX + GraalVM] project, but building it is hard and have yet to successfully run the project as native image.

Googling shows that I might be attempting something a bit too experimental? Is there an alternative I'm not aware of that could allow me to build such a project as a native image? Ideally I would like to keep Spring Boot, JavaFX is not required.

Resources on how to achieve the aforementioned pipeline would be best, but a redirection to a proper way of doing such things would also be good.

Dranna
  • 505
  • 3
  • 15
  • Why do you want a [native image](https://www.graalvm.org/reference-manual/native-image/) rather than a [jpackaged](https://openjdk.java.net/jeps/392) app? – jewelsea Nov 25 '21 at 18:18
  • @jewelsea Being new to jpackaged apps, I gave it a try. Besides the pipeline hassle I encountered to build it (jdeps, jlink, jpackage), it seems like Spring Boot is not modularized yet and jlink gives me error like "automatic module cannot be used with jlink: spring.core from ..." – Dranna Nov 25 '21 at 19:44
  • Your app and libraries don’t need to be modular to use jpackage, even when the underlying JRE and JavaFX modules are. See github.com/dlemmermann/JPackageScriptFX. But, yes, I know it is a hassle. – jewelsea Nov 26 '21 at 00:34
  • @jewelsea Ok, thanks. I'm giving it a try with your example but running into issues. I opened a different question as the topic shifted https://stackoverflow.com/questions/70134864/jpackaged-javafx-spring-boot-does-not-launch – Dranna Nov 27 '21 at 12:40

0 Answers0