F
F
fife2021-01-22 22:33:42
Java
fife, 2021-01-22 22:33:42

How to make a java exe file?

I wrote a graphical program in Java, and I want to make an exe for it to run it on a PC without the JDK, but simply with java installed.
Actually I googled the following algorithm of actions:
1. I open the Project structure - artifacts, create a new one from models with dependecies, select the main class from the proposed ones, press ok, ok. build - build Artifacts and select it.
2. I open Lauch4j in the output file, I specify the folder for the file output, in the Jar I specify the artifact from idea. In JRE min version I write 1.4.0. I press the gear.
When running the resulting exe file, it gives an error: A JNI error has occurred, please check your installation and try again.
I'll attach the Path variables with a screenshot of the 600b276670def470016794.jpeg
JDK I'm using version 11
another screenshot with the java version600b27dc6eafb631474574.png
Actually the question is how to solve this problem?
And is it possible to transfer this exe file later so that it works on a PC without a JDK?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Orkhan, 2021-01-22
@fife

Hello!


Actually the question is how to solve this problem?

Here is the answer link to your first question
https://stackoverflow.com/questions/50075705/jni-e...
And is it possible to transfer this exe file later so that it works on a PC without a JDK?

Here is the link to answer your question:
https://eax.me/java-without-jvm/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question