Create an executable jar with Eclipse IDE ----------------------------------------- 1. Right click on Java project (pick a project with a GUI) 2. Export 3. Java , Runnable Jar file 4. At Launch configuration select your project 5. At Export destination, select where you want this jar file exported to 6. Finish Create an executable jar with IntelliJ ----------------------------------------- 1. File , Project Structure , Artifacts , (+) , JAR , jar from module with dependencies 2. Main Class: select the class containing your main method 3. OK 3. Change output directory to where you want this JAR saved to 6. Apply , OK 7. Build (top of window in IntelliJ) , Build Artifacts , Build If you want an icon, convert an image to a .ico file ---------------------------------------------------- 1. icoconvert.com/ (this is a decent site) 2. Choose your image (file type my vary) 3. Upload 4. Convert to ICO 5. Download your icon Use Launch4j to create an .exe with custom icon ---------------------------------------------- 1. Install Launch4j launch4j.sourceforge.net/ 2. Output file: browse for the output destination and name your file ending with .exe 3. Jar: browse for where you saved your jar or executable jar file 4. (Optional) Icon: browse for your custom icon (must be .ico) 5. navigate to JRE tab 6. Bundled JRE path: Browse for location of your jdk (Example C:\Program Files\Java\jdk-14.0.1) 7. At the top of window, click the Build Wrapper (gear icon) 8. name and save the Lauch4j config file where you want 9. Your application.exe should be saved to your output file location (no longer need previous files)
Good, please help us on how to do it using CLI like command prompt. Three years ago i create one using cmd on windows but when i try to create one which is very big project that has a packages i fail.
Thank you for the amazing and simple video!! At first I was facing a problem that it wouldn't run, I'd double click and nothing so when I changed the 'Open with' to -> 'Java(TM) Platform SE Binary' instead of 'OpenJDK Platform binary' it would open normally, just in case anyone was facing the same issues I was!
Oh, wow!!!! I always wanted a way how to make jave program executable. This is really... really helpful. When you upload game series, I will make that game, then turn it into executable so everyone could play, seriously, you helped me a lot! Thank you from the bottom of my heart.
Your videos are the best! I try to search something up and figure it out that way, but it's so complicated! But when I turn on one of your tutorials, I learn so much so quickly! It just becomes so easy!
this was EXTREMELY useful and simple. Thank you so much. I really like the content you create. Please do more project type of videos in the future (like creating java games or simple projects)
man thanks to this guy's videos i feel motivated to learn other videos i c teaching feel so dull Bro Code is the best channel for learning i found so far your efforts are much appreciated
My program runs fine in eclipse and the JavaFX works great but when I export it as an executable and then try to run it. Nothing happens. Any idea why?
for some reason my jar file doesn't work on another computer, may I ask why? it says " A JNI error has occured, please check your installation and try again"
after i clicked "finished" and "ok" and tried to click the jar file on the desktop and its not running, the cmd just appeared like a second then disappear and wont run. Can you help me
Anyone experiencing a problem like : when you try to run nothing happens, Go to Project > Properties > Libraries > select an older JDK version (11 worked for me). Now it would work fine.
For some reason, the images I added to my program don't show up in the .jar application, however, they do show up when I run the program in NetBeans. Is there any solution to this problem?
program quickly appears then disappears. Everything is properly installed. When trying to run it from the cmd line, it claims that it cant find the main class when it's there. How to fix?
Hey! I had a problem after converting the jar file to exe, when i run the exe file, it says - 'Error- A JNL error occurred, please check your installation and try again', and when i press 'OK' it again shows 'A Java Exception has occurred and it closes. If you know the fix to this problem, please reply to this comment. :)
@@trxlly since that comment I have googled and found out that maybe it's trying to execute the jar with a different version of java (like JDK 12 vs JRE 8 or something idk, idrk java versions or anything. someone fixed it by deleting one of the versions of java, I suggest googling it if you understand this stuff
hey brocode, i just wanna ask about this weird situation, somehow my app does not open when its on desktop, but when its inside my dist folder it works perfectly fine. can anyone help? id really appreciate it.
maybe my java is configured incorrectly but i followed your exact instruction exactly but it didn't work even the one with the original java icon didn't open
Hey, nice Tutorial, but i can't get the Jar Working. i don't know how to solve. Error: A JNI error has occurre, please check your Installation and try again ? Windowname: Java Virtual Machine Launcher, ive made a Quiz with your other Tutorial with Swing
hello sir, i followed your steps and exported the app successfully. However, when I open the application, although the functions seem to run normally, I cannot hear the sound I assigned to the button every time I press it. Is there any way you can help me, thank you very much
🖐maven projects (ie. making 3d drawing ) can not be opened after exporting to jar file. is there another way to make them jar file in eclipse. Thanks❤.
Thanks but pls help me I followed your snake game tut and when i export it and open it says "error a JNI error has occurred, please check your installation and try again
Create an executable jar with Eclipse IDE
-----------------------------------------
1. Right click on Java project (pick a project with a GUI)
2. Export
3. Java , Runnable Jar file
4. At Launch configuration select your project
5. At Export destination, select where you want this jar file exported to
6. Finish
Create an executable jar with IntelliJ
-----------------------------------------
1. File , Project Structure , Artifacts , (+) , JAR , jar from module with dependencies
2. Main Class: select the class containing your main method
3. OK
3. Change output directory to where you want this JAR saved to
6. Apply , OK
7. Build (top of window in IntelliJ) , Build Artifacts , Build
If you want an icon, convert an image to a .ico file
----------------------------------------------------
1. icoconvert.com/ (this is a decent site)
2. Choose your image (file type my vary)
3. Upload
4. Convert to ICO
5. Download your icon
Use Launch4j to create an .exe with custom icon
----------------------------------------------
1. Install Launch4j launch4j.sourceforge.net/
2. Output file: browse for the output destination and name your file ending with .exe
3. Jar: browse for where you saved your jar or executable jar file
4. (Optional) Icon: browse for your custom icon (must be .ico)
5. navigate to JRE tab
6. Bundled JRE path: Browse for location of your jdk (Example C:\Program Files\Java\jdk-14.0.1)
7. At the top of window, click the Build Wrapper (gear icon)
8. name and save the Lauch4j config file where you want
9. Your application.exe should be saved to your output file location (no longer need previous files)
Good, please help us on how to do it using CLI like command prompt. Three years ago i create one using cmd on windows but when i try to create one which is very big project that has a packages i fail.
Too bad everyone that follows this will realize when they double click on the file it does nothing. Maybe you should explain what to do next.
Simple, stress free and to the point.
your saying "sit back ,relax and enjoy the show" is just Wow!
Thank you brother. Simple, quick and no unwarranted jargon. Straight to the point of the video.
Thank you for the amazing and simple video!!
At first I was facing a problem that it wouldn't run, I'd double click and nothing so when I changed the 'Open with' to -> 'Java(TM) Platform SE Binary' instead of 'OpenJDK Platform binary' it would open normally, just in case anyone was facing the same issues I was!
thanks
Thanks buddy😊
Not working still
Please add more projects to this playlist. That way we will be excited and keep motivated while watching the tutorials.
Oh, wow!!!!
I always wanted a way how to make jave program executable.
This is really... really helpful.
When you upload game series, I will make that game, then turn it into executable so everyone could play, seriously, you helped me a lot!
Thank you from the bottom of my heart.
You're welcome! Hopefully these steps work for you
@@BroCodez don't worry bro, it's working:)
Your videos are the best! I try to search something up and figure it out that way, but it's so complicated! But when I turn on one of your tutorials, I learn so much so quickly! It just becomes so easy!
bro really tried to sneak his nuclear launch codes folder in there and thought we wouldnt notice 💀💀. jokes aside great video
this was EXTREMELY useful and simple. Thank you so much. I really like the content you create. Please do more project type of videos in the future (like creating java games or simple projects)
thanks for watching Oğuzhan. I might if the people demand it lol
I demand it bro!
We demand it really.
bro is the exe file sharable. i. e if i share that file to my friend (would he be able to run the file) give that he has JRE
your video is much more worth than many expensive course like your recommendation at first video. thank again bro! :)
thanks for watching Jfrauit!
Nice an awesome video like always!
Commenting for YT algorithm
man thanks to this guy's videos i feel motivated to learn other videos i c teaching feel so dull Bro Code is the best channel for learning i found so far your efforts are much appreciated
Very simple explanation. Very humble teacher.
Nice an awesome video like always!
Commenting for YT algorithm
Thank you very much for this great and simple tutorial ! 🙂
nobody talking about how bro casually has a folder of nuclear launch codes?
Thanks for sharing
You made my day, bro. As always, great video.
I love your videos man. They help me so much as a new programmer trying to learn java.
Thanks so much for this video. It has all the information and is straight to the point.
bro u are a lifesaver huge respect man
Bro has the nuclear launch codes casually on his desktop
I finished C, Java, next MySQL. Thanks a million!!!
Thank you for making these videos.
Thank you! Easy to follow perfect guide!
Extremely useful video. This is what I want !!!! Great
Keep making such great videos.
Nice an awesome video like always!
Commenting for YT algorithmNice an awesome video like always!
Commenting for YT algorithm
My program runs fine in eclipse and the JavaFX works great but when I export it as an executable and then try to run it. Nothing happens. Any idea why?
I have the same problem, how did you solve it?
Go to Project > Properties > Libraries > select an older JDK version (11 worked for me). Now it would work fine.
This is what I wanted the most
for some reason my jar file doesn't work on another computer, may I ask why? it says " A JNI error has occured, please check your installation and try again"
Maybe its missing some files?
Nice an awesome video like always!
Commenting for YT algorithm
Simply genius bro
Thank you so much for this video
nice tutorial
Very good. Can you show us also how to make an executable jar from JvaFX project, pleae?
Just what I was in need of.
I can only say Thank you.
and thank you for the invitation.
I'm in
Nice
Cool video. I have question for you: do web applications will destroy desktop, mobile and .jar applications?
many thanks ! happy at your methodology
Thank you, that's extremely helpful!
Exactly what I was looking for! Thanks Bro!
vscode user sitting in the back 🗿
understandable and comprehensible
this man is a legend
Awesome
Best tutorial, thanks
Thank you so much. You're the best teacher.
Nice an awesome video like always!
Commenting for YT algorithm
I liked this video
bro you are so helpful thanks for your work
Thank You
thanks :D
helps a lot to know this trick
after i clicked "finished" and "ok" and tried to click the jar file on the desktop and its not running, the cmd just appeared like a second then disappear and wont run. Can you help me
Anyone experiencing a problem like : when you try to run nothing happens, Go to Project > Properties > Libraries > select an older JDK version (11 worked for me). Now it would work fine.
Replying to this, So people would notice more.
bro how i can select older one
Wow, that was great. Thank you!!
i was looking for this, thanx bro
Thanks, really helpful! 🤝
Bro, do you have tutorials on how to do it in vscode? I exported mine as jar file and after I open it, it does nothing
For some reason, the images I added to my program don't show up in the .jar application, however, they do show up when I run the program in NetBeans. Is there any solution to this problem?
hi, i am having this same problem as you, how did you solve it? please help me.
Copy those which you use in your profgram and past you jar program folder
Yeah my icon shows up on the executable but not on the jframe itself.
Can you show us on how to do it on the terminal?
program quickly appears then disappears. Everything is properly installed. When trying to run it from the cmd line, it claims that it cant find the main class when it's there. How to fix?
Thank you for made how to do this on IntelliJ
Great tut. II'm kinda ' old school, I prefer to do it on the command line. Thanks1
Nice, my friend doesn't know how to run a .jar file and I would've unfriended him if not for this video :D
You are the best
A true hero
thank you dude ur literally my teacher lol
THANK YOU
SO MUCH
Fellow bro
Thanks bro
Thank you
thanks, appreciate it!
amazing
QUESTION
Great Vid... thank you
TEEEE AMOOOOOO TE AMOO TE AMO
thank you , great video !
Awesome!!! I just need to have a mobile exe file
when i do it, the jar file doesnt include images and other resource files (in Eclipse)
Hello, I run into the exact problem. Can you help me?
@@gofchu idk my problem is still there, idk how to fix it.
Hey! I had a problem after converting the jar file to exe, when i run the exe file, it says - 'Error- A JNL error occurred, please check your installation and try again', and when i press 'OK' it again shows 'A Java Exception has occurred and it closes. If you know the fix to this problem, please reply to this comment. :)
replying so that other replies will gimme notifs bc I have this issue too
@@spidernh oof
@@trxlly since that comment I have googled and found out that maybe it's trying to execute the jar with a different version of java (like JDK 12 vs JRE 8 or something idk, idrk java versions or anything. someone fixed it by deleting one of the versions of java, I suggest googling it if you understand this stuff
@@spidernh ok thx
have u solved?
Thanks!
Thanks bro. İt s helpful..
❤❤
What if i use net beans?
Cool!
MUSIC IS FROM FROM KINDERGARDEN!!!!!!!! (i think)
nobody questioned the nuclear launch codes???
I followed the same way you showed with IntelliJ. But after I run the jar file, it shows "A JNI error has occurred"
Does this work / is the process the same on Mac?
hey brocode, i just wanna ask about this weird situation, somehow my app does not open when its on desktop, but when its inside my dist folder it works perfectly fine. can anyone help? id really appreciate it.
maybe my java is configured incorrectly but i followed your exact instruction exactly but it didn't work even the one with the original java icon didn't open
Can make it as an standalone executable, where u dont need jvm to run?
Hey, nice Tutorial, but i can't get the Jar Working. i don't know how to solve. Error: A JNI error has occurre, please check your Installation and try again ? Windowname: Java Virtual Machine Launcher, ive made a Quiz with your other Tutorial with Swing
thnkzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz broooooooooooooooooooooooooo
hello sir, i followed your steps and exported the app successfully. However, when I open the application, although the functions seem to run normally, I cannot hear the sound I assigned to the button every time I press it. Is there any way you can help me, thank you very much
🖐maven projects (ie. making 3d drawing ) can not be opened after exporting to jar file. is there another way to make them jar file in eclipse. Thanks❤.
thanks bro!
I can't run my jar files made with jdk14. I have tried using jre8 and using the java.exe in jdk14 but none of them work. Please help
I am also facing the Same problem but the solution did not get.
There is a problem. If you create an exe from your code, all the pictues(png/jpg...) will disappear from the exe. How to fix?
can i have the nuclear launch codes?
Thanks but pls help me I followed your snake game tut and when i export it and open it says "error a JNI error has occurred, please check your installation and try again
The same thing happens when I send my files to my friends...
BRO CODE! I have the same desktop photo on your PC!
the exe doesn't open...why? i followed all your steps