[Java] Export files and exe jar
After building software with java, we need to export or exe file run jar format that can run directly like any other software that is not in eclipse or NetBean to shaking it. This article will guide you to do the job so.
Content
Initially I had 1 project Dijkstra like this and we will do iện create jar file from eclipse and NetBean, then transferred from the jar to exe file if desired (Since the jar file is just like exe executable file and then).
Create a jar file in eclipse
The steps are as follows:
On the eclipse choose File -> Export -> Runnable JAR file
Next select the project or program to produce at Launch Configuration and * .jar file name in Export Distination
As shown on the Desktop itself to it in.
If you use time windows can be opened like any other program. If you use linux then open terminal (or cmd in windows) to move to the Desktop with the command cd:
cd Desktop
Run the following command file:
java -jar dijkstra.jar
Create a jar file on NetBean
On NetBean you right click project implementation to produce the jar file, selected clean and build. That's it, Now you will see in the project folder dist, in which the project will have a jar file.
Moving from jar to exe file with launch4j
First of all you download launch4j about (search on google for the latest version) or use the version you are currently using here. Install the software as normal and open up.
At the interface of launch4j we implement parameters:
Tại tab basic, we fill in information about the jar file path and exe file after export
At jre tab you enter information about the smallest version to run the program (dạng x.x.x) jre path and attach if there.
Finally wheel icon above to export exe file.
My program works depends on the database now switched jar or exe, how to attach it with DC ạ?
I also have not tried this one. You try hard to google search more, if the results reported to yourselves. Thank you.
config db, khi mở app lên cho nó set user, pass, db name, port,… submit thì set vào config db trong project là ok
Unknown contribute nothing, cảm ơn bạn nhé 🙂
nó báo lỗi lúc click vào cái bánh răng anh quân ơi : specify output with file .exe extension launch4j . làm thế nào fix vậy anh quân
Quân à đếch phải biết nói thế nào nhưng bạn hướng dẫn rất nhiều bài thật là hay thật quá đầy đủ.Cảm ơn bạn đã chia sẻ kiến thức cảm ơn người anh em
Cảm ơn nhá, chia sẻ cho mọi người giúp tớ để cùng biết là được rùi 🙂
bạn có thể tl giúp mình được không khi mình đã có được file rar rồi mình add file rar đó vào 2 if your project is different from the class to create objects in it rar . when I send objects from the project 1 through project 2 equal 1 socket, the project 2 recognize it right you?
Are you nhé.
Welcome
Thank you for sharing this useful
Ask yourself tiny, his time output .jar file, only its content production run, the algorithm functions in the package do not have
We wish sentence from your trl
I have not misread. You export the files you want, then use whichever ones that call out.
How to attach images and data into the jar file so he?
On eclipse run normally but when creating the jar file, the image does not have.
Expecting him to answer!
Its time to export the JAR file size by eclipse other with trembling at what you shall do?