Answer the question
In order to leave comments, you need to log in
How to compile Java application with built-in jvm libraries?
I write applications on 18 Java with JavaFX. I work in IntelIJ idea with maven. Goal: Build a complete application so that it doesn't require 18 java to run.
From what has turned out so far - Collect .jar But it requires 18 version of java, collected through launch4j it turned out to be a beautiful exe but also requires 18 java. Best of all, it turned out using jlink, it turned out to be an image, but the application is fragmented into a bunch of files, and is launched through a batch file, which is not very convenient.
Is it possible to somehow make maven build an exe that does not require Java 18?
Answer the question
In order to leave comments, you need to log in
If we talk about how to do it normally, then no, you can’t. You still need to install jre into the system as a separate component for the user, so if you are doing it under windows, then you need to do a normal installer that checks for jre in the system and prompts you to install it if it is not there. In any case, distributing a program simply as an exe is bad practice.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question