I've noticed that a JNI error occurs in some environments. When that error happens, pls try to copy your jdk (usually in C:\Program Files\Java) instead of jre and also change the exe path accordingly. Sorry for the trouble!
@Iraxvii
2 жыл бұрын
Hi. When using a JDK instead of a JRE, do you include the entire JDK or just the bin and lib folders? Thank you :)
@RyiSnow
2 жыл бұрын
Only bin and lib and it worked for me :)
@bluethemcguy4430
2 жыл бұрын
Thank You So Much!!! This was the exact error I got. Thank you for posting a fix about this problem! :)
@griffinbrooks6748
Жыл бұрын
@@bluethemcguy4430 Haha same! i was trying so much and i was about to comment and then saw this :D
@cayman_islands
Жыл бұрын
the exe file still needs java..
@MajinHico
3 жыл бұрын
Underrated video, extremely useful. Thank you.
@jonahkollenberg1060
3 жыл бұрын
You are an actual national hero. Thank you so much. This video saved me. Thank you
@toshinoriyagi2460
Жыл бұрын
Has anyone had the same problem and does anyone know how to solve? The JRE tab on Launch4j is a bit different and I don't know what am I doing wrong. I used JDK version 20.0.1 and when I try to create the .exe file it does so, but it doesn't run whatsoever, while it was running as a .Jar file. Thank you in advance guys.
@michalmily4605
Жыл бұрын
hi, today I tried this for the first time... and after several errors I finally ran it. I used lib and bin folder from jdk-17. In JRE settings in launch4j(v. 3.50) i checked "JDK required" (min. JRE version 1.6.0). with these settings i am able to run it on different PCs.
@stepanzavadil
3 жыл бұрын
nice, worked for me if you are having trouble with JRE, just put there lib and bin from JDK that you developed on ;)
@RyiSnow
4 жыл бұрын
If your image or other resources don't show up in the exported program, please check if you have specified your resources correctly in your code. Absolute address such as ".//res//image.jpg" doesn't work in exported programs (either jar or exe). If you are not sure how to specify resources, check this video that I made a while ago: kzitem.info/news/bejne/xWZotn9ufGd2lHY
@LeoOno
4 жыл бұрын
awesome !!! this is something i always wanted to know. i'll definitely try it later, thanks :) !
@RyiSnow
4 жыл бұрын
Good to hear that!
@LeoOno
3 жыл бұрын
@@aproe610 hey man, yeah i love @RyiSnow videos :)
@user-vs4gp4pn2n
3 жыл бұрын
Thank you so much.by the way if your project is a console only,then you need choose Header Type:Console at Header-->Header Type.otherwise the exe can't to run.
@CadenKoehl
2 жыл бұрын
Thank you so much! This was incredibly helpful and informative, you just earned a subscriber!
@mimatila
7 ай бұрын
Great! 2 chinese guys helped a lot lately! Very good way to show things!
@firizz
2 жыл бұрын
I've already done every single step, but when i click on the exe file, nothing happened
@perronegro4077
3 жыл бұрын
Thank you very much, you helped me a lot.
@masoudhasanlu299
6 ай бұрын
very good explanation, thank you
@Aaishat
5 ай бұрын
Thank you sir
@untyoowan
4 жыл бұрын
THE KING IS BACK
@axelcarre8939
4 жыл бұрын
Insane dude!
@alexejo8467
4 жыл бұрын
you are the messiah !!!!!!!!
@Dan-py2kf
Жыл бұрын
Awesome tutorial, thank you!
@marcelor.aiello5050
4 жыл бұрын
Very helpful! / thks
@jeandredegenaar9292
11 ай бұрын
Hi how do I get the .exe to run on the other device if I had to add JVM Options, I added the libraries etc. to the same file and changed the paths to use the one's in the folder. By doing this it runs on my device but not on another device.
@harounjaafar6918
Жыл бұрын
why don't open che exe i follow the step but there is write error whit java:[Error: A JNI error has occurred, please check your installation and try again] from the JVM launcher and after that another error: [A Java Exception has occured]. please help
@cayman_islands
Жыл бұрын
the exe file still needs java..
@jokar7882
3 жыл бұрын
thank you, you are the best
@1jhonbreinnersdh804
Жыл бұрын
I need help please where I can get that version of launch 3.12 at the moment it is in 3.50 and the jre configuration part of the program is different
@jasminemerritt1831
2 жыл бұрын
When I go to specify the main class, why isn't my application package showing up?
@michalmily4605
Жыл бұрын
thx for this video. very helpful.
@kristopherwerlinder6446
4 жыл бұрын
I am getting [Error: A JNI error has occurred, please check your installation and try again] from the JVM launcher and after that another error: [A Java Exception has occured]. Has anyone had a similar issue or have any hints? Any help is appreciated! For context: my .jar file works perfectly fine, I have version 1.8.0 JRE and I use image and wav resources in my jar file.
@sparkfire22223
4 жыл бұрын
hi, I have EXACTLY the same problem right down to the version of JRE I have which is also 1.8.0 - did you ever get an answer to this question?
@ednaldopereira2646
4 жыл бұрын
i have the same problem
@kristopherwerlinder6446
4 жыл бұрын
@@sparkfire22223 I have not found an answer yet unfortunately. My understanding is that with bundled JRE and Jar I can run an executable on any machine. Is this correct?
@sparkfire22223
4 жыл бұрын
@@kristopherwerlinder6446 I think so - I know that a runnable Jar file can run as long as the machine has Java installed. So if you've got a bundled JRE (which would effectively have Java in the bundle itself) then anyone should be able to run it - just wish the wrapper could work as it would be easier than creating a bundle... I think!
@MaDCoN41
4 жыл бұрын
same problem here! haven't found a fix yet.. :(
@Rafael-ol1ie
2 жыл бұрын
hi, can u show how can i make the application self updtable too?
@tangtai4011
Жыл бұрын
you are my hero! thank you so much!
@1jhonbreinnersdh804
Жыл бұрын
I need help please where I can get that version of launch 3.12 at the moment it is in 3.50 and the jre configuration part of the program is different
@1jhonbreinnersdh804
Жыл бұрын
It works for me and everything in .exe version but I pass it to another computer and it asks me for jre 17
@rizaangelim.servilla7723
3 жыл бұрын
hello thanks for the great vid but in my csse it said "error: a JNI error has occurred, please check your installation and try again" "A Java exception has occurred". i have installed the java form the website and did all your instructions but that error occurred …..
@Daaninator
3 жыл бұрын
same
@Daaninator
3 жыл бұрын
I fixed the issue, just replace everything in jre with all the files in c:->program files->java->jdk jdk has more information in jre and that's why we get an error
@ronakkumarpatel9991
2 жыл бұрын
very helpful video, can you please explain if launch4j is not available is there any other way for creating a package of exe file and jre so that programme can run on any operating system
@Yudielch2010
4 жыл бұрын
Awesome video!
@erykne
2 жыл бұрын
Thank you so much!
@sarikagarg8185
3 жыл бұрын
thank you sir. It is working
@cilaaantro8801
Жыл бұрын
hey, when I double click my jar file, nothing happens. I tried doing a runnable jar file instead, and nothing still happens.
@cilaaantro8801
Жыл бұрын
nvm, I was able to fix it. I saw a reddit post saying to run the jar file on command prompt to see if any errors pop up. Apparently, jar files are much more case sensitive and there were pathfiles that i accidentally capitalized.
@prathamsarankar-csecs-0398
4 жыл бұрын
Hey! It worked but only the stage is visible in another computer.
@theanimalqueen8610
3 жыл бұрын
This does not work for me? I have had 3 different errors depending on the system I try to execute from. 1. is main class not found, 2. is the I see the loading circle and then nothing happens, 3. This version of %1 is not compatible with the version of windows you are running. (this last one is windows 7). any help or suggestions is appreciated. Thanks!
@marwenjaffel
Жыл бұрын
Is there a solution "This version of %1 is not compatible with the version of windows you are running" ?
@P4cX
3 жыл бұрын
Thanks alot :)
@pleaseteachme977
3 жыл бұрын
awesome! but how if the computer is different bit?
@nirbhay1564
3 жыл бұрын
It works for both 32 bit and 64 bit os??
@mimatila
7 ай бұрын
How this can be done in Linux?
@mimatila
7 ай бұрын
I found it out, lauch4j works both.
@stratfender89
2 жыл бұрын
What do you do if you have a Jar file that isn't opening at all? I have made the cookie clicker application as well and even with JRE 1.8 on my computer it won't open. I tried converting it to an executable but it doesn't run still.
@RyiSnow
2 жыл бұрын
Did you select the entry point when you exported?
@stratfender89
2 жыл бұрын
@@RyiSnow Yeah, I did and still nothing.
@RyiSnow
2 жыл бұрын
The next thing you want to check is whether resource file names are correctly typed. File names are case-sensitive in Jar while not in IDE. So typing cookieimage.png to read a file called CookieImage.png still works in IDE but not in Jar. If Jar couldn't read a file, it stops there.
@stratfender89
2 жыл бұрын
@@RyiSnow So, I figured out what the problem is. It's a NullPointerException because of the audio player. I took the audio player from your point and click adventure, but this doesn't want to export for some reason :/. I've been going over the code and can't seem to find a solution except to run it in eclipse.
@RyiSnow
2 жыл бұрын
Ah ok, I just checked my P&C code and maybe I found out the cause. If you're putting your audio files in a folder in your res folder (like res/audio), then change the code like this: from URL sound1 = getClass().getClassLoader().getResource("audio/sound1.wav"); to URL sound1 = getClass().getResource("/audio/sound1.wav"); *Remove "getClassLoader" and add " / " before the folder name. When exported as jar, the ClassLoader cannot find files in a folder created in res and I think I forgot about this when I created that tutorial.
@harihabicht6251
4 жыл бұрын
thanks a lot!!
@sarikagarg8185
3 жыл бұрын
how to make exe for 32bit or 64bit
@authenticknowledge9349
4 жыл бұрын
I did exactly what he did and in order for my exe to start in a vmware pc, I had to extract it, so the jre was visible to the file explorer. Any advice would be appreciated.
@soni801
4 жыл бұрын
using this method, the jre needs to be visible. afaik there is no way you can put the jre inside the .exe file. the standard thing to do is to copy a local jre to the programs programdata folder, using an external installer.
@fud49
3 жыл бұрын
it wont work for me, says something about temp/launch4j
@griffydz1789
3 жыл бұрын
write the error on google, most likely has found the solution.
@Stev4iK_FeeD
4 жыл бұрын
I don't understand why this video has so few views and likes...
@prathamsarankar-csecs-0398
4 жыл бұрын
There are less no. of passionate programmers, it proves.
@tanvirrafi7483
3 жыл бұрын
question what if i only send .EXE without the folder will it work?
@RyiSnow
3 жыл бұрын
As I mention in the video, EXE file only doesn't work. You need JRE to run Java programs. That's the whole point of this video anyway...
@seilimons822
3 жыл бұрын
Is it possible to include the JRE files in the .exe?
@ClaudioBOsorio
2 жыл бұрын
Thanks man. Nice Japanese
@sparkfire22223
4 жыл бұрын
RyiSnow followed your steps exactly - thanks for providing such a succinct and clear guide! However, it is not working for me - and I can see another person commenting below has had the same problem... I get the error "A JNI Error has occurred, please check your installation and try again". After this it is followed by "A Java Exception has occurred". My program works perfectly - within the Eclipse IDE it runs without any problems whatsoever. are you able to assist?
@RyiSnow
4 жыл бұрын
Hi, I'm not sure exactly but that sounds like a compiler/JDK error so maybe you're compiling with a higher version of Java ? Check your Eclipse's compiler settings and see if the program is complied within the maximum version that you set in Launch4j.
@sparkfire22223
4 жыл бұрын
@@RyiSnow Hi - It looks like the latest version of Launch4J requires JDK versions 1.6.0 to 1.8.9 -- for anyone downloading the latest Eclipse package, they'll get JDK- 13. So unless there's a solution, it looks like Launch4J hasn't managed to keep up with the latest versions of JDK. Any suggestions? Alternatively I'll see if I can find another solution - thanks for your help.
@RyiSnow
4 жыл бұрын
You can change the compiler settings by selecting Windows>Preferences>Java>Compiler on Eclipse. If your compliance level is set as 9 or later, try changing it to 1.8 and see if it works.
@christofferosgame_name5095
4 жыл бұрын
@@RyiSnow Hi, great video! Does your EXE now contain the JRE? Does this mean that the EXE file takes a larger amount of memory space compared to the JAR file? I am wondering because my EXE and JAR have the same storage space indicating that the JRE is missing in my EXE file.
@Valdrox
3 жыл бұрын
@@sparkfire22223 Did you ever get any sort of resolution of this issue? I've spent 3 days now scouring the internet for ways to fix this, and I haven't come up with anything yet.
@khanfriaicha2488
4 жыл бұрын
please i have to create java+mysql application installer (.exe) can i?
@soni801
4 жыл бұрын
not with this method
@NinaNina-cz7ym
Жыл бұрын
@@soni801with witch method plzz
@griffydz1789
3 жыл бұрын
Hello, are you japanese? What is your story? I am so curious. Did you go to study abroad or something like that Thanks for the video
@RyiSnow
3 жыл бұрын
Hi, thanks for watching. Yes I am Japanese. I have never lived outside of Japan but I like learning English :)
@griffydz1789
3 жыл бұрын
@@RyiSnow Your video helped a lot, i liked how you took the time to describe lot of details (icon etc), you have a good english accent. Is learning a new langage easier for someone who had to learn tons and tons of katakana hiragana and kanji? hahaa
@RyiSnow
3 жыл бұрын
Hmm I don't know for me English is actually a pretty difficult language to learn since the composition of the language is so different from Japanese. They say learning Japanese for English speakers and vice versa is the hardest learning language experience and I kind of want to agree with it :P
@griffydz1789
3 жыл бұрын
@@RyiSnow maybe i can't tell :p (i am speaking English-Arabic, curious about japanese (Daijobou, sasageyo, shotto matte, sumimasen, .. many words i heard from anime), and speak another langage aswell ahah)
@nayaunglin5015
Жыл бұрын
arigatoo
@kaanyenel5157
4 жыл бұрын
you're f*cking gorgeous dude! this is exactly what I am looking for
@shubhojeetbanerjee6810
4 жыл бұрын
This application requires a java runtime environment 1.6.0-1.8.9 this error is coming.. please someone help
@mannyokafor4609
4 жыл бұрын
i have the same problem i will try to create another but without any min or max jre will notify u with results Results: Did not work an error message aswell.
@fabianvelander
3 жыл бұрын
just download the java runtime environment like it tells you to do. For me it sent me to the webpage even...
@mannyokafor4609
3 жыл бұрын
@@fabianvelander Do you think the user wants to download java?
@fabianvelander
3 жыл бұрын
@@mannyokafor4609 no, that's what this video is for. But YOU need to download Java Runtime Environment to run launch4j.
@mannyokafor4609
3 жыл бұрын
@@fabianvelander I already have, I mean the user...
@user-ku4jf6nc2g
4 жыл бұрын
Oh, I can't see the image in the exe file. Help me.
@RyiSnow
4 жыл бұрын
Can you see the image when you export your program as a jar file?
@user-ku4jf6nc2g
4 жыл бұрын
@@RyiSnow I didn't see your video 'Ext8'. Now I've solved the problem. Your video was really helpful. Thank you. :)
@RyiSnow
4 жыл бұрын
No problem :D Glad to hear that you solved the issue!
@yanchengcheok
Жыл бұрын
Thank you. It is very helpful. Do you have idea how we can bundle the same for Linux? Also, including JRE will increase installation size significantly (around additional 214 MB), right? Thank!
@RyiSnow
Жыл бұрын
Yes, it should be around that size. As for Linux, I don't have a Linux machine so I cannot check it. Sorry!
@beebuumba
Жыл бұрын
A java exception has occurred
@homeingbeacan5191
3 жыл бұрын
What if they delete the JRE file?
@RyiSnow
3 жыл бұрын
Then I think their computer suggests them to install Java.
@muhammadsalem9924
2 жыл бұрын
Hello Sir, I made an app using java swing +mysql How can I convert this code with its mysql database into an application that I can install on my desktop or on any other computer? Thanks
@6L6Lcephas
3 жыл бұрын
japanese awesome I don't know
@jandikable
3 жыл бұрын
In python or C# I suspect it would be 5 mb instead of 170 mb ))
Пікірлер: 122