Reputation: 209
I want to run my java program in another PC which do not have java installed and I want to do so either. I want a method by which I have to click on an icon and my program runs which will not need java installed on the system. Creating a .jar file or .exe file by Launch4J did not help as they need to have java installed on the system.
By the way, my program is built using javafx, it do not need console input or output. All the work is done in a window created using javafx.
Upvotes: 0
Views: 3370
Reputation: 12542
You can try Oracle self contained packaging.
A self-contained application contains your Java or JavaFX application and the JRE needed to run the application
Check out the docs
Upvotes: 4
Reputation: 2624
Use Excelsior JET. It compiles an entire JRE plus your code into an EXE file. It runs with the bundled JRE inside the exe and does not require a JRE to be installed on Windows.
Because it compiles your code, It also runs faster and cannot be decompiled later. So it adds a layer of protection to your code too which is nice for commercial software.
Only drawback is that it is not free (has a 90-day free trial) and each release stops working after 90 days. So you need to buy it if you want to use it as your release solution. The Excelsior package also contains an installer creator called JetPack.
Upvotes: 0