• Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

Java Make a java app that doesn't require Java Runtime Enviorment on the user's PC

Bogdan Floares

New Coder
I have an app developed with Java Development Kit and I after building to an Executable JAR, I tried a free jar to exe converter hoping that it doesn't require JRE to run on a Windows Computer. I tried to run it on a Windows 10 Virtual Machine and it says Java Runtime 1.8 or above is required(I think I use JDK 1.8.0). Is there any way to make it into an exe that runs with no JRE dependencies
 

HadASpook

Coder
Hello there, @Bogdan Floares.

I recommend giving this article a quick read on Wikipedia: https://en.wikipedia.org/wiki/JRE

Java code gets compiled into bytecode(the Java instruction set) and this is then ran inside a JVM(Java Virtual Machine); the JRE(Java Runtime Environment) is the standard JVM supplied by the Java developers themselves. Because Java bytecode needs to be ran inside a JVM, you are pretty much out of luck in this regard.

There are tools out there that can convert Java bytecode into native executable code or alternatively, you can bundle the JRE with your program, which saves the end-user's hassle of having to install Java(of course, do make them aware that your program will be installing Java on their system).

Hope this helps.
 

Top