How to Convert/Wrap JAR into EXE file and Bundle JRE - Java Extra 33

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
how all this is right now at this time I'm going to explain how to make your programs runnable on computers that don't have Java installed probably most of you guys know how to export a jar file so if you export your program as a jar file then you know it is runnable as long as the computer has Java JRE but what if we want to give our programs to someone whose pee she doesn't have Java maybe asking them to go to Oracle website and download Java stuff like that is a bit too much so I'm going to explain how to avoid such a situation so you just give you a program and then they can just play your game or run your programs so let's start and as a sample program I'm gonna use this cookie clicker program that I made a long time ago and so first thing we're gonna do is export this as a Java file okay so so let's click this project named cookie clicker and right click and export and checked this jar file and the next and ok and with so I'm gonna choose desktop and name this jar file so whatever good or something and save and also next next and choose this main cross whatever the cross that has a mini method and the finish okay let's check this okay so yeah we don't need to use this anymore so yeah now we have this cookie clicker jar file and then we are going to change this jar file to executable file and the to change a jar file to an executable file we are going to use a application called launch hojae yeah this is a pretty popular application so so basically you can use this and change your jar file to yeah Exe file you can download this and install it yeah so I just activated this launch 4j and so using this launch forgery we are going to make a kind of a package if you just change this jar file to execute Exe file it still cannot too long without the Java so what we gonna do is we're gonna include Java Runtime and make kind of a package so with this executable file and JRE so then if you give this package to your friends or whoever you know they can use this bundle to Jerry and so also can learn your program okay so before using this launch 4j okay I think I'm gonna make a folder here and the name this cookie 1.0 or something and from this and inside we're gonna make another folder and name these ads they re so and inside of JRE okay and then open set up to this program files and also select a Java and here so you can find your JRE in my case it's the version is 1.8 and inside of this cherry you can find this two folders bin and the leaf library so we're gonna copy these two folders to this cookie clicker 1.0 folder so copy okay so you're inside of this Jerry folder you copy these two folders okay now let's ease this launch for J okay so first I'll select this basic basic top and select to this output file so open this and I choose this some cookie clicker 1.20 and here so you can type whatever name you want but basically this is this is going to be the the name of this exe file so and the save and then we're gonna choose jar file so open this and choose desktop and this one so cookie clicker jar and choose this okay and also so if you want you can change the icon of this yeah file your program so I think I'm going to use this cookie icon okay so open this and I put this icon - yeah okay anyway so here let's choose this icon this one okay and so this section is done then now let's choose this a JRE top and so first here bundled Gerry past this is see yeah so this is probably the most important part of this tutorial and about what you need to do is just type Gerry here and so this Gerry means this Gerry so we put inside of this quickie click folder and inside of this we have copied the JRE so we want to let you know this executable file to access this JRE and then okay and also here change this to this one only use private JDK runtimes and here so you need to type some minimal version JRE version and so we have 1.8 so you know basically whatever number you want as long as it you know less than 1.8 so 4.20 or whatever and maximum you don't have to type so and also yeah you can add some more informations but basically this is everything that you have to do so first are choose this output file and file name and also it just a file and if you want to use a conditioner icon then not choose your icon file like this and then JRE and so make sure to choose this Gerry copied Gerry and also minimum version and the only is private JDK runtimes ok this is ready so click this call icon so if we click this when output file with specify out to Iris oh sorry I think I forgot to type exe let's try again ok and so now yeah select to this folder ok and so it's gonna automatically export configuration files so you can name whatever you want so like config and safe ok so yeah and so now we are seeing this file and this is actually a executable file so so we just created this exe file from this jar file ok let's click this so yeah so you can run your program from this exe file and what yeah so but it's a it's only natural because you know I've already installed Java in my computer but even if you send this folder to your friend and even if your friend doesn't have Java in their PC don't but they still can run this program so so to check that now I'm gonna send this folder to my laptop and my love doesn't have Java installed and we're gonna check if it is really learn about or not okay so yeah this is my laptop so I've hi I'm recording this with my smart phone because umm no like a recording software is installed in this laptop so well anyway so this is the cookieclicker deep file so I just copied from my USB memories and the so let's decompress this and okay so now we got this folder and so inside this folder JRE folder and a config file and icon file and also executable file so yeah let's click this Exe file yeah so it's a program activated and you can play this game so yeah like this so making this executable file and also a bundling this jelly file so you can give your game or program to your friend and so you can also you know use a program even if they don't have Java so yeah that's everything and I hope this is useful for you and thanks for watching and I'll see you again bye
Info
Channel: RyiSnow
Views: 18,286
Rating: undefined out of 5
Keywords:
Id: h68WlAn_Vfg
Channel Id: undefined
Length: 11min 46sec (706 seconds)
Published: Fri Apr 24 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.