Is there any way to create the exe file of spring boot application executable jar? I've used launch maven plugin but exe file which it's creation is not working. On double click it doesn't show application Console....
You can use Launch4J:
https://genuinecoder.com/convert-java-jar-to-exe/
Download Launch4J: http://launch4j.sourceforge.net/
Select your .jar and the output for your .exe
Select additional details, for example an Icon. Most basic configs speak for themself.
Include classpaths:
Aditonally select the required java version in the JRE tab.
Build the .exe!
--
Although in your case if you just want to run the .jar I would look at my other comment first and run it with
java -jar <jar-file-name>.jar
I have a project called "agenda", designed in Java with MySQL database. Developed the application at Netbeans.
I want to launch an executable .exe from the .jar (Clean and build) with the Launch4j program. I follow the steps correctly:
giving a name to the .exe
looking for the .jar from which to generate the .exe
select an .ico image
minimum JRE 1.8
It correctly generates the .exe but when I want to launch it to test, it tells me:
MySQL failed.
I have the XAMPP open (both MySQL and Apache).
I am building an installer for a JavaFX 1.8 Windows application.
This application contains a JNI.
When I run the Ant script with the jdk 1.8.0_172, files named api-ms-win-core-*.dll and ucrtbase.dll are copied to the runtime\bin install directory. Those files are not present when I run the exact same script with jdk 1.8.0_144.
I have tested my program without those files and it works fine. What could be a path to investigate to understand how to get rid of those files?
Also, msvcp120.dll is updated to msvcp140.dll and vcruntime140.dll file appears (and is needed).
Thanks!
I have created a project to collect the daily status in an xls sheet, using the selenium webdriver.
Currently it runs well.
Can I make this project into a standalone application or a executable jar? Or is there some other way to collect the status by clicking on the application or jar to open it without having to compile and run from eclipse?
You can use install4j from below mention URL. It will make executable jar and application.exe also you can make installer for different platforms such as Mac, Windows and Linux.
https://www.ej-technologies.com/products/install4j/overview.html
hope it will help
From Eclipse select Export -> Runnable JAR File
Select 'Extract required libraries into generated JAR'
When you have your JAR file execute :
java -jar MyJar.jar
I created a tic-tac-toe game in Java. It runs fine on Eclipse.
How do I compile this file (which is currently a .java file) to the standard file format of Java applications, so it can be run from the desktop like a normal program?
What is the standard file type for the final executable Java application? What should be the file type if I want people to easily and without any computer knowledge run my program on their computers?
with eclipse right click on your project. then export it as a runnable .jar file.
Project Right Click > Export > Runnable .jar File.
First choose your project under "Launch configuration", then choose your destination.
After that click finish. Your program should be in your destination folder. Double click to start (just like an .exe file)
For example: If you export it to your desktop, and you name it "TicTacToe", the file on your desktop is "TicTacToe.jar" - ".jar" is your executable file
Done
You have to compile your java class first
javac TicTac.java
and then execute it
java TicTac
Note: that here you provide the name of the class with the main method!
As the other answers indicated, you can create an executable jar using eclipse (or a number of other tools). What these tools are doing under the hood is defining the Main-Class: attribute in the jar's manifest.
In Windows, your users can double click on an executable .jar to launch it, as long as the file associations are configured correctly. However this may not be obvious to windows users who are trained to expect some sort of .exe extension.
To solve this, you could use launch4j to wrap your executable jar in a windows executable. Note: this doesn't change your java application into a native application (it still requires the JVM, etc), it simply makes it launch more like a native application.
For deploying Java desktop apps., the best option is usually to install the app. using Java Web Start. JWS works on Windows, OS X & *nix.
Note that JWS is more effort for us to deploy (it involves not only Jarring and signing the code, but creating a JNLP launch file and a page on the net or network to check that Java is installed & serve the files to the user), but is super easy for the end user.
If there is a JWS deployment, the Jar does not have to be an 'executable Jar' as described in the other answers.
The command should be javac yourFile.java from you command prompt and then after compilation, class file is created. You can run it using java MailClassName
You can find a good tutorial on using javac and java commands here.