Export JavaFX 11, 15 or 17 projects into an executable jar file with IntelliJ [2022]

Поделиться
HTML-код
  • Опубликовано: 29 сен 2024
  • In this video, I will be showcasing how to create a jar file from JavaFX 11 or above with IntelliJ. I hope you enjoyed this video if you did place leave a like and feel free to ask any questions in the comment section.
    (Only works on Windows)
    My channel publishes videos regarding programming, software engineering especially Java and JavaFX. If that is what you are looking for then do not hesitate to join me on this journey!
    Subscribe to my RUclips channel:
    / @randomcode_0
    Helpful links:
    How to install Intellij: • How to install Intelli...
    How to setup JavaFX with IntelliJ: • How to setup JavaFX 11...
    How to create a jar file with maven: • Create executable jar ...

Комментарии • 248

  • @ahmedfawad51
    @ahmedfawad51 2 года назад +20

    really appreciate your work, these steps should have been specified by Intellij on their website, it really made my day after hours of failed research my project finally works with the jar .. PS this is my first comment on youTube ever since i made my account 10 years ago :D cheers

    • @Randomcode_0
      @Randomcode_0  2 года назад

      Thank you so much! It is an honor to be your first comment in 10 years :D

    • @hahahouhis2783
      @hahahouhis2783 2 года назад

      I strongly agree with you. It was not about hours... It was about days!😝
      Good job!

  • @MrFunny01
    @MrFunny01 2 года назад +1

    I don't beleive that creating ANOTHER class will help. such a bruh moment. BUT IT ACTUALLY WORKED. Ty

  • @DanielAndersson0
    @DanielAndersson0 3 года назад +18

    I've spent at least 10 hours trying to figure out how to do exactly this, trying numerous other tutorials all of which didn't work for me... Unbelievable that it was this simple, and so difficult to find a tutorial explaining this method! Thank you so much!

    • @Randomcode_0
      @Randomcode_0  3 года назад +1

      Glad I could help! I had the same problem, and when I then finally found a decent solution, I thought I would share it.

  • @SaNiKuS101
    @SaNiKuS101 Год назад

    Thank you so much, my friend! I have spend the whole evening, trying to figure out, what am I doing wrong and now I see this video! Sry for my bad english...

  • @HurriKate414
    @HurriKate414 Год назад

    THANK YOU so much for this! IntelliJ really does not make this an easy process.

  • @VsevolodRostovskiy
    @VsevolodRostovskiy Год назад

    Thank you for the video! I am just starting to learn Java. Please tell me, this jar file does not require anything other than JVM? Are all required libraries packed into a jar file?

    • @Randomcode_0
      @Randomcode_0  Год назад

      If the jar file was created with all of its dependencies included, then it should not require any other libraries or dependencies to run other than the JVM. However, if the jar file was created without including all of its dependencies, then it may require other libraries or dependencies to be available on the system to run.
      In most cases, we can create what is called a fat jar to include all needed dependencies.

    • @VsevolodRostovskiy
      @VsevolodRostovskiy Год назад

      @@Randomcode_0 Thanks a lot!

  • @joshclarencebunag6280
    @joshclarencebunag6280 Год назад

    HOLY DAMN!!! THIS ACTUALLY WORKKKKKKKKKKKKKK!!!!!!!!

    • @Randomcode_0
      @Randomcode_0  Год назад +1

      I know that feeling! Glad I was able to help.

    • @joshclarencebunag6280
      @joshclarencebunag6280 Год назад

      @@Randomcode_0 Yeah been looking for solutions like this for countless of hours before i seen your video, such an hassle...Thank you so much!!

  • @Whatsup-fl5ww
    @Whatsup-fl5ww 3 месяца назад

    if i deploy it in vercel will the link i get from it be able to work as it does when i execute in IntelliJ?

  • @prabha7976
    @prabha7976 3 года назад +1

    In bin folder I am unable to copy all the files...can someone help me out plzz

    • @Randomcode_0
      @Randomcode_0  3 года назад

      Inside my bin folder I click on the first file then hold down shift and press on the last file, and then I just click ok to import the files.

  • @Loknitro
    @Loknitro 9 месяцев назад

    Thx, it worked

  • @dublUayaychtee
    @dublUayaychtee 2 года назад +1

    I am on Linux so when I downloaded the sdk, there was no bin folder. Do I have to download the one for windows and use the dlls from there?

    • @Randomcode_0
      @Randomcode_0  2 года назад

      I have not been able to find a proper solution to your problem. My best suggestion would be to use something like Maven or Gradle to try building you Jar file.

    • @dublUayaychtee
      @dublUayaychtee 2 года назад +1

      @@Randomcode_0 downloading the windows dll files worked

    • @Randomcode_0
      @Randomcode_0  2 года назад

      Nice, good to knwo!

    • @Andrew-yv7zh
      @Andrew-yv7zh 2 года назад

      Just add the .so files from the bin folder. Most of them start with "lib" but aside from that, the filenames are the same. (You'll be missing some "api-****.dll" files but that's fine, you don't need those on linux)

  • @ernanfer2
    @ernanfer2 2 года назад

    hi....good video...but how to do in linux ? thanks

    • @Randomcode_0
      @Randomcode_0  2 года назад

      I have not tried it myself, but as far as I know, it should be more or less the same process on Linux. Let me know how it goes.

  • @artemykrylov
    @artemykrylov 2 года назад +13

    Thanks to you, I found a solution for MacOS. I added all the ".dylib" files from the "javafx-sdk / lib" directory to the artifact.
    And it worked the same way as you have with ".dll" files.

  • @user-rx3ny9ji8i
    @user-rx3ny9ji8i Год назад +5

    Concise and just what I needed to get it working (when it obviously should out of the box). I indeed needed the 'fake' main class + the added DLL to make it auto executable, each one alone wouldn't be enough to make it work.
    Also for those that let Intellij download the JavaFX files, the default Intellij location for those will be : C:\Users\YOUR_USER\.openjfx\cache
    There, you will have folders depending on the version of JDK used. For me with JDK 19 it was in a '19+ 11' folder, then amd64, and then all those precisous DLLs
    Hope it can help more people (and maybe the maintainer at JetBrain or JavaFx update something ? (ಠ﹏ಠ)

  • @elhoussem3594
    @elhoussem3594 2 года назад +1

    Sir, I did all the steps but the jar file won't to start or launch .... I have : jdk-17.0.2 and jdk-18.0.1.1 and javafx-sdk-18.0.1.
    the problem is in Eclipse and Intellij ..... just on javafx but for just java there is no problem.
    I worked on Swing on Eclipse and the jar file work correctly .... I don't know why in javafx nothing work when I export but and compilation it work well ??!

  • @jimthompson9215
    @jimthompson9215 3 года назад +6

    I've been trying to export an available jar for one day till I found this video... Thanks A LOT!!!! It helps me and save me A LOT of time.

  • @mirzafardeen1257
    @mirzafardeen1257 3 года назад +1

    So when I click on jar file , nothing really happens

  • @IslamTheRightWay10
    @IslamTheRightWay10 2 года назад +3

    Dosent work for me

  • @bizzoulabaou
    @bizzoulabaou 10 месяцев назад +1

    This does not work for me.
    I just have: A Java Exception has occurred.
    I can run it with "java -jar test.jar" though.

    • @H2P_TPL
      @H2P_TPL 3 месяца назад

      have you done it

  • @ЛюблюТактики-ъ1к
    @ЛюблюТактики-ъ1к 3 года назад +2

    It just doesn't work. Jar won't start. I have JavaFX11. (I added a check mark in the place where we added the files) Wow, it works now. You really helped me. I will recommend you 🧐

  • @RK-zg9cd
    @RK-zg9cd Год назад +1

    Huge thanks man) i tried to make a jar-file using maven commands, but it kept throwing out a strange error, google didn't help. But ofc your metod helped me)

  • @Traptrickerplays
    @Traptrickerplays 2 года назад +2

    Thanks for the video! When I launch the jar nothing happens and when I look at the error message it gives me
    "Error: Could not find or load main class com.traptricker.etherminetrackerjavafx.Main_1
    Caused by: java.lang.ClassNotFoundException: com.traptricker.etherminetrackerjavafx.Main_1".
    Do you know how I fix this?

  • @s3nsimilla193
    @s3nsimilla193 3 года назад +2

    Hey, I'm trying to do the same but on Mac OS. I mean I want to build artefacts on Mac OS but I want to run a program in Windows 10. Unfortunately it does not works. The only way I can run a program on windows is use cmd and "java --module-path path/to/fx/lib --add-modules JavaFX.controls, JavaFX.fxml - jar app.jar". I added all DLL's but this does not works :(

    • @Randomcode_0
      @Randomcode_0  3 года назад +1

      I am not a Mac OS user and have never been, so I have no idea why it doesn't work. Hope you figure it out! :)

    • @Randomcode_0
      @Randomcode_0  3 года назад

      @s3nsi milla,
      I can see you posted another comment but for some reason it is not showing.
      But regarding your qustion, I am using JavaFX JDK 15 in this video.

  • @ThanhNguyen-ts2ks
    @ThanhNguyen-ts2ks 10 месяцев назад

    Help me!
    I'm trying to build jar file from lesson #17: FileChooser: saving files, but it doesn't work.
    could someone explain to me why?
    By the way, thank Random code for this great course! really appreciate your work.

  • @JamesBrodski
    @JamesBrodski Год назад +2

    God bless you sir! It actually worked thank you so much :)

  • @algot34
    @algot34 Год назад +1

    2:07 where can I download those JavaFX folders? I don't have them and can't seem to find a download link anywhere. I have version 19. On gluonhq There are no .dll files or bin folder for version 19.

  • @pinnball7992
    @pinnball7992 3 года назад +3

    This is the first way I have found that actually works. You are a hero. Now feel like i have completed Java! Thank you much.

  • @ErnienatorLego
    @ErnienatorLego 2 года назад +2

    Thank you so so much. Your Video helped me after already giving up. I think the most tutorials dont tell that you have to add all the .dll files. You safed my day

  • @michaelangel6178
    @michaelangel6178 2 года назад +2

    It works, thanks dude. I have another solution using excel and some files but this is clean

    • @Randomcode_0
      @Randomcode_0  2 года назад +1

      Great to hear! It is always good to search for new and different solutions.

  • @MarkTheMadMan
    @MarkTheMadMan Месяц назад

    Great video, however in JavaFX 20 you don't need all the files in the bin folder to be included. You only need - glass . dll, javafx_font . dll and prism_d3d . dll if you just have a basic FXML JavaFX application with the 4 main modules (javafx . base, javafx . controls, javafx . graphics and javafx . fxml). If you use more modules you might need more dll dependancies ofc

    • @Randomcode_0
      @Randomcode_0  Месяц назад +1

      Thank you very much for letting us know. The beauty of software is that it keeps evolving.

  • @moukhafianass4053
    @moukhafianass4053 3 года назад +1

    what about javafx application using maven

    • @Randomcode_0
      @Randomcode_0  3 года назад

      Check this video for my solution using maven: ruclips.net/video/EyYb0GmtEX4/видео.html

  • @benbailor2229
    @benbailor2229 Год назад

    when i do this and double click the jar file nothing at all happens can someone help

  • @faiadhossainchowdhury6690
    @faiadhossainchowdhury6690 5 месяцев назад

    really appreciate your work , keep creating this type of videos

  • @jrcastle
    @jrcastle Год назад

    Thank you for your video, helps me a lot. Nevertheless mi application doesn´t find the files (words, html, database) needed to work propertly. It´s seem that all the paths are wrong. I checked the jar file and have the same structure than my proyect, and in IntelliJ it´s work perfect. Any Idea why it´s happening??

    • @Randomcode_0
      @Randomcode_0  Год назад

      You would need your files to have a relative path, which can be used by the project. This means you should place any file you interact with in the resource folder and retrieve them as if they were located there. If this is not the issue, I am not quite sure.

  • @klarissaclairiton9010
    @klarissaclairiton9010 Год назад

    This works for a simple program with no additional libraries. My program uses additional libraries such as Lucene for text searching and Java mail for sending messages. My program reads a file at startup as well. Error: Could not find or load main class main.AncestryLaunch
    Caused by: java.lang.ClassNotFoundException: main.AncestryLaunch

    • @Randomcode_0
      @Randomcode_0  Год назад

      You are very much right, this is a very manual apraoch only working for JavaFX. Building larger and more complex project you should always use a build tool like maven or gradle.

  • @pamirsahak
    @pamirsahak 3 года назад +1

    Hi
    i did everything exactly the same but the built jar file is not opening not giving even an error, However i built a swing GUI app it works.
    i have this problem only in JavaFX project.

    • @Randomcode_0
      @Randomcode_0  3 года назад

      I am sorry I got no idea why it does not work, and it is very weird it is not giving any errors. The problem regarding JavaFX is that it is no longer supported by the newer versions of Java.

  • @vojinkrstic9347
    @vojinkrstic9347 2 года назад

    When i start it with command prompt I get this message: no main manifest attribute, in Restoran.jar
    Even tho I have manifest.mf file:
    Manifest-Version: 1.0
    Main-Class: Main_1
    Do you know what could be the problem?

    • @Randomcode_0
      @Randomcode_0  2 года назад

      It might be because do not define in which package your main class is located. If you main class was located inside com.mypackage it would look like this: "Main-Class: com.mypackage.MyMainClass"

  • @shanksakagami8780
    @shanksakagami8780 Год назад

    why i can run the file?
    it says a java exception has occured

  • @keesb8656
    @keesb8656 2 года назад +1

    You're the greatest. I've spend a day not getting the solution. The internet only talks about adding your sdk folder. Appearantly extending from Application was my error.

    • @Randomcode_0
      @Randomcode_0  2 года назад

      Glad to hear I was able to help!

  • @U_Lambda
    @U_Lambda Год назад

    Any reason why mine would be exporting as a zip?

  • @Marc-jn3wn
    @Marc-jn3wn 3 года назад +1

    Doesn't work on Linux or Mac because of the missing DLL Files. They are only available on Windows

  • @mahiram.7282
    @mahiram.7282 3 года назад +2

    Thank you so much. I have been stuck on this for days.

  • @michealking6425
    @michealking6425 7 дней назад

    Got mimes to work, finally ❤

  • @u_n_d_e_r_s_c_o_r_e_d
    @u_n_d_e_r_s_c_o_r_e_d Год назад

    can i do it without .dll files? large .jar size

  • @albertosabuco5812
    @albertosabuco5812 7 месяцев назад

    I follow your steps, but when I get this exception, and I've tried everything
    Error al inicializar la SessionFactory: java.lang.NullPointerException: Cannot invoke "java.lang.reflect.Method.invoke(Object, Object[])" because "org.glassfish.jaxb.runtime.v2.runtime.reflect.opt.Injector.defineClass" is null

  • @kcodesubfield5145
    @kcodesubfield5145 3 года назад +1

    Thanks Sir but i have observed that when u have different package and u build its does not run. When is it appropriate to build jar file when the project is completed or as you are developing or at the initial stage

    • @Randomcode_0
      @Randomcode_0  3 года назад

      I am not 100% sure when it is "correct" to use jar files. You should think of a jar file kind of like the ZIP file format, which means we use to compress a project into one file which we can then send to other to reduce loss of data.
      Takle a look at the Java Documentation for more information: docs.oracle.com/javase/8/docs/technotes/guides/jar/jarGuide.html

  • @Kanimeworld534
    @Kanimeworld534 3 года назад +1

    It worked thank you so much was stucked here from days .Just one doubt how you selected all files at once from bin?

    • @Randomcode_0
      @Randomcode_0  3 года назад

      I selected all the files by first clicking on the first file then holding down shift and clicking on the last files, then all files in between will also be selected (I use Windows btw).

  • @eugenvonderkipe6031
    @eugenvonderkipe6031 3 года назад +1

    Thanks a lot! I had to write software for an academic paper for my degree course and couldnt get it to run outside my IDE. If it wasnt for this vid I would not have been able to finish it.

    • @Randomcode_0
      @Randomcode_0  3 года назад

      Wow! I am glad I could help and good luck regarding you academic paper!

  • @ahmadfx8962
    @ahmadfx8962 3 года назад +1

    even the intellij web site did not give the solution to solve this problem ...thank you very very much

    • @Randomcode_0
      @Randomcode_0  3 года назад +1

      I am just very happy I could help :)

  • @AarónMendoza-i9k
    @AarónMendoza-i9k Год назад

    Y este .jar se puede distribuir multiplataforma?

  • @scabbardgaming9456
    @scabbardgaming9456 2 года назад

    it doesn't work for me.
    my JDK version is 16 and OpenJFX 17.
    I guess there some bugs to be fixed in my version.
    or i have some configuration errors or it is all about the version I've been used.

  • @xXHolger1980Xx
    @xXHolger1980Xx 2 года назад +1

    Thank you! I searched for the solution for a long time, your video helped me!

  • @quenyanwarrior8741
    @quenyanwarrior8741 Год назад

    does maven or gradle will have anything affecting the steps you mentioned?

    • @Randomcode_0
      @Randomcode_0  Год назад +1

      Gradle is built on Maven so I would assume it should be possible to achieve the same result with both, however I am not too familiar with Gradle so I can't say for sure.

  • @benjaming7219
    @benjaming7219 Год назад

    Thank you, I've been trying to figure out why it wasn't taking the jxml file and went through 2 ide's to try and solve this.

  • @phylaxcool
    @phylaxcool 3 года назад +1

    i tried run the jar with "java -jar example.jar" but it says "Error: Could not find or load main class Main_1" how to fix this bro?

    • @Randomcode_0
      @Randomcode_0  3 года назад

      There are quite a few reasons you could get this error. The simplest solution would be that you have the Main_1 class in the wrong package, it needs to be in src. You could also try removing the underscore from the name because it sometimes is a problem with some operating systems. If this isn’t the case, I do not know why it is not working.

    • @phylaxcool
      @phylaxcool 3 года назад +1

      @@Randomcode_0 i created and new project and it runs smoothly, my bad sir. I think my project is broken because i changed the jdk. Thankyou very much :D
      EDIT:
      After some research about Could not find or load main class error. In my case, this is because sql server driver 9.2. Tried to remove it and it works or downgrading the sql server driver.

    • @Randomcode_0
      @Randomcode_0  3 года назад

      Glad you got it working :) And you always learn something when you get it working at the end!

  • @dhananjayat1373
    @dhananjayat1373 3 года назад

    I create jar using uaing this video.but i converting it into exe using launch4j get error as jni error occured.problem is in my jre.how to fix that.please help dear.

  • @DeeTasticGaming
    @DeeTasticGaming Год назад

    Not all heroes wear capes. No but seriously, thank you so much! I was about to rip my hair out, and I'm bald.. so like, that wouldn't have went well!

    • @Randomcode_0
      @Randomcode_0  Год назад

      I know the feeling! I also struggled getting this working and just wanted to share what I found, but this sadly do not work for everyone.

  • @beetrout7705
    @beetrout7705 3 года назад +1

    Thank you sooooo much!!! Ive been searching internet for this for so long.

  • @khanhsb15
    @khanhsb15 Год назад

    Thanks you, it's very helpful !. For those who encounter the error: "Error: JavaFX runtime components are missing, and are required to run this application when export .jar file" when run .jar file with command: "java -jar app.jar". Let's add dependencies in pom.xml:
    org.openjfx
    javafx-base
    12


    org.openjfx
    javafx-controls
    12


    org.openjfx
    javafx-graphics
    12
    win


    org.openjfx
    javafx-fxml
    12


    org.openjfx
    javafx-web
    12


    org.openjfx
    javafx-media
    12


    org.openjfx
    javafx-swing
    12

  • @maryamparsa3606
    @maryamparsa3606 2 года назад

    hi: please tell us ; maven or gradl used in this project? thanks a lot

    • @Randomcode_0
      @Randomcode_0  2 года назад

      In this video I am neither, it is a plain Java application where I manually added JavaFX. I would recommend using Maven.

  • @akumadom7207
    @akumadom7207 10 месяцев назад +1

    didn't work

    • @H2P_TPL
      @H2P_TPL 3 месяца назад

      you know the solution?

  • @ShujaaAhmad
    @ShujaaAhmad Год назад +1

    Thankyou very much for making this video. ✨

  • @darios5355
    @darios5355 7 месяцев назад

    Even though this video is old it helped me a lot!
    I just want to leave that comment here to say thank you!

  • @mohammadmehdikhajehzadeh1655
    @mohammadmehdikhajehzadeh1655 3 года назад +1

    when I want to run it i get JNI error. what jre version do you use?

    • @Randomcode_0
      @Randomcode_0  3 года назад +1

      I am using 15.0.1
      It is a problem where the Java versions in your program does not exist on your computer.
      I had a friend who had the JNI problem as well, he need Java SE Development Kit 15.0.1 downloaded to run the versions build with 15.0.1.
      Where to download Java Development Kits www.oracle.com/java/technologies/javase/jdk15-archive-downloads.html
      I also had someone else having the same problem using this: webdeasy.de/en/error-a-jni-error-has-occured-how-to-fix-this-java-error/

  • @QuangPham-bc7lc
    @QuangPham-bc7lc 3 года назад +1

    when i run the artifacts which I built, the image and txt file can't be loaded. it said "path" (The system cannot find the path specified). but if I run on intelliJ, it completely normal. I dont understand why. Can u explain it for me

    • @Randomcode_0
      @Randomcode_0  3 года назад +1

      I would assume it is because you access your files using a relative path or the full, path which would be changed when you build you program. You should put text and images inside a resource folder, you then need to access your files through the resource folder, which will stay the same when you build you project.
      I got a video about this topic: ruclips.net/video/ABXiJkCcevc/видео.html

    • @QuangPham-bc7lc
      @QuangPham-bc7lc 3 года назад

      @@Randomcode_0 i do exactly the same as you but i still get "Cannot invoke "java.net.URL.getPath()" because the return value of "java.lang.Class.getResource(String)" is null". In my resources i have 1 package, i have put my txt file inside it and even outside that package (but still in resource). If i just create a java project then do like you is ok but with javaFX i dont understand why

    • @QuangPham-bc7lc
      @QuangPham-bc7lc 3 года назад

      @@Randomcode_0 sorry my mistake :))) i dont know why when i use in class which is not main although i have add "Main.class" before getResource it didnt run but in Main file it run perfectly. Anyway tks you very much

    • @Randomcode_0
      @Randomcode_0  3 года назад

      Glad I could help :)

  • @legoaggelos2722
    @legoaggelos2722 Год назад

    is there a way to make the file smaller? 41mb for a small program like that is a little big

  • @glitz6320
    @glitz6320 8 месяцев назад

    What if i have multipage app?

  • @quenyanwarrior8741
    @quenyanwarrior8741 Год назад

    does it work on mac or linux too? the one that imports the dlls file, in my experience, DLL associates with windows

    • @Randomcode_0
      @Randomcode_0  Год назад +1

      I have only tested it on windows. I seem to remember some previous comments discussing that it was possible, but I can't guarantee that it works.

    • @quenyanwarrior8741
      @quenyanwarrior8741 Год назад

      @@Randomcode_0 I tried it, instead of dlls, in mac lib folder i have .jar, .dylib, as well as .properties file, i just put all those to the project and run just fine.

  • @martinsauer4854
    @martinsauer4854 3 года назад +1

    You should do a follow up video on this but with maven and not just JavaFX but any possible dependency

    • @Randomcode_0
      @Randomcode_0  3 года назад

      That is a pretty good idea I might do that! :)

    • @Randomcode_0
      @Randomcode_0  3 года назад

      Check out my newest video it should be what you are looking for:
      Create executable jar file for JavaFX 15 using Maven: ruclips.net/video/EyYb0GmtEX4/видео.html

  • @hritwikbhowmik1266
    @hritwikbhowmik1266 2 года назад

    You saved my ass from banging.....god bless you and your family

  • @The242511
    @The242511 3 года назад +1

    One question, when I make a Main_1 class do I need to add every external libs I use or only JavaFX?

    • @Randomcode_0
      @Randomcode_0  3 года назад +1

      We do it with JavaFX because it is no longer supported by newer versions of Java, it should not be necessary to add every library, but it depends on the library. I sadly cannot give you a real answer, because it depends, we need to add everything that is not supported by the JDK we use.

    • @The242511
      @The242511 3 года назад +1

      @@Randomcode_0 Oh yes, I forgot they parted JavaFX from Java in the newer version, ok I'll try the good ol' brute force when the time comes for executable build :D

    • @Randomcode_0
      @Randomcode_0  3 года назад

      That's the spirit! :D

  • @rainb0_0
    @rainb0_0 3 года назад +1

    TNX SO MUCH
    I was stuck at first part myself

  • @laponiec
    @laponiec Год назад

    This method worked for me, the other method from your other video didn't

    • @Randomcode_0
      @Randomcode_0  Год назад

      Good to hear! Some versions of JavaFX just work and some do not. It is a bit weird. I am just glad you got it working.

  • @aleksthomson9457
    @aleksthomson9457 11 месяцев назад

    it didn't work for me ((((((((

  • @AGTGames1
    @AGTGames1 3 года назад +2

    Bro thx for the tutorial

    • @AGTGames1
      @AGTGames1 3 года назад +2

      Ive been looking for it the whole week but just found old methods

    • @Randomcode_0
      @Randomcode_0  3 года назад +1

      I had the same problem! Glad I could help!

  • @NeatKibbles4
    @NeatKibbles4 2 года назад +1

    God bless you and thank you! You literally saved me

  • @HereticFalcon
    @HereticFalcon 2 года назад

    Hi!
    What do you think about to make a video for Kotlin TornadoFx project import to jar with IntelliJ and with gradle? I only found written examples on Stackoverflow and none of them works for me. Thanks in advance!

  • @faiadhossainchowdhury6690
    @faiadhossainchowdhury6690 5 месяцев назад

    really appreciate your work , keep creating this type of videos

  • @tweber476
    @tweber476 3 года назад +1

    I constantly get this Error: A JNI error has occured, please check your installation and try again. Although I can run my program in Intellij normally. Any clues?
    Cheers!

    • @Randomcode_0
      @Randomcode_0  3 года назад

      I have never had this problem myself, after reading a bit about you error message, it seems to be a problem regarding your java version on your computer.
      Found this page trying to solve the problem: webdeasy.de/en/error-a-jni-error-has-occured-how-to-fix-this-java-error/
      Hope it helped I sadly cannot give any better solution :)

    • @tweber476
      @tweber476 3 года назад

      @@Randomcode_0 unfortunately didn't work. Thnx for ur help though! :)

    • @Randomcode_0
      @Randomcode_0  3 года назад

      I am sorry I could not be to much help, I am sure you will figure it out!

    • @simonhutchinson2723
      @simonhutchinson2723 3 года назад

      Have you managed to fix this error yet? I am getting the same thing

    • @MrNyvle
      @MrNyvle 3 года назад

      @@simonhutchinson2723 I managed to fix this error, I followed the link above and I was using OpenJ9, once I changed it to the correct javaw.exe I checked that my JRE/JDK and SDK where the same. They weren't my java was 1.8.0 and my SDK was openjdk 15, once i switched my SDK to 1.8 after a rebuild of the project it finaly worked. I hope I wasn't too late to help if it helps at all :)

  • @Cecil_Augus
    @Cecil_Augus Год назад

    Tysm. Not even GPT was explaining this correctly to me.

  • @es-vs3ey
    @es-vs3ey 3 года назад +1

    Thanks!!! It works fine :)
    Can you maybe explain why you need to get all the files from the bin folder?

    • @Randomcode_0
      @Randomcode_0  3 года назад +2

      Glad I could help!
      We need to get the files from the bin folder because we are creating a normal jar file (Not including JavaFX), we then manually need to get the JavaFX files into the jar file to get it working with JavaFX (the bin folder contains all the JavaFX classes). We cannot just create a JavaFX Jar file because the newer versions of JavaFX have some problems.
      Hope this explains it :)

    • @es-vs3ey
      @es-vs3ey 3 года назад +1

      @@Randomcode_0 Thank you for your answer ! :)
      Could you tell me the source where this is explained or documented? I can't find any usefull explanation on IntelliJ or JavaFX (openjfx-docs).

    • @Randomcode_0
      @Randomcode_0  3 года назад +1

      @e s This way of doing it is not a "proper" way, and I doubt any real documentation exists, at least not that I know of. This is just a way it worked for me in the past, I am sorry I cannot give you a better answer :)

    • @es-vs3ey
      @es-vs3ey 3 года назад +1

      @@Randomcode_0 Thank you anyway for your efforts mate :)

  • @androidevmiftahul
    @androidevmiftahul 3 года назад +2

    Thanks mr

  • @matrixblack9424
    @matrixblack9424 2 года назад +1

    Thank you it helped me.

  • @lukasschonwetter9717
    @lukasschonwetter9717 2 года назад

    Maybe someone runs in to the same problem as me: this didn’t work with java 18 (Oracle OpenJDK version 18.0.1), but it did work with java 17 (Oracle OpenJDK version 17.0.1)

    • @Randomcode_0
      @Randomcode_0  2 года назад +1

      For some reason, most "tricks" only seem to work for some versions. Which is a bit annoying.

  • @serhatkaradag8786
    @serhatkaradag8786 2 года назад +1

    Dont work man.

    • @Randomcode_0
      @Randomcode_0  2 года назад

      Sorry to hear that, hope you find another working solution.

    • @serhatkaradag8786
      @serhatkaradag8786 2 года назад +2

      @@Randomcode_0 But I cannot understand. I did 1-1 same what you did in video. If I click the jar file , the app doenst open yourself.

  • @zachwatkins639
    @zachwatkins639 Год назад

    As others have stated, the amount of time that I have spent on this is insane. Thank you so very much, you have ended my suffering!

  • @Rybka599
    @Rybka599 Год назад

    I LOVE YOUUUU REEEEEEEEEEEE

  • @mateuszsojka7775
    @mateuszsojka7775 2 года назад

    I followed your way and everything worked great beside the init() and stop() methods... is there a way to make them work as normal? or maybe some workaround? I am getting really hard time with it.

  • @makkusaiko
    @makkusaiko 2 года назад +1

    Thanks dude. You really helped me

  • @Kevin-jw7fh
    @Kevin-jw7fh 2 года назад

    ur a god.

  • @shlomighty
    @shlomighty 2 года назад +1

    Straight to the point and concise, Thank you so much man!

  • @Zurenio
    @Zurenio 3 года назад +1

    Thank you very very much.....! great....

  • @masco4268
    @masco4268 Год назад

    thanks man, you helped me a lot. I was struggling with this problem for about 4 hours now... Thank you

  • @dashknow5082
    @dashknow5082 3 года назад +1

    It works :). Plus I subscribe :)

    • @Randomcode_0
      @Randomcode_0  3 года назад +1

      Glad to hear it worked!
      Glad you subbed! :)

  • @anderdesantos4045
    @anderdesantos4045 2 года назад

    I've spent too many hours trying to export it into a jar program and this is the only way that worked for me. All the answers were the same except for the solution in this video and is the one that worked

    • @Randomcode_0
      @Randomcode_0  2 года назад

      It can sometimes be a bit magical, I'm just glad yo hear you got it working!

  • @user-yz5hj3zg2x
    @user-yz5hj3zg2x Год назад

    It worked!! I can't believe that it worked, after weeks trying to find an answer, it finally worked! You're a lifesaver!

  • @ArmoFreekickerz
    @ArmoFreekickerz 3 года назад +1

    thank you bro, you helped me a lot

    • @Randomcode_0
      @Randomcode_0  3 года назад

      Thank you! Glad you enjoy my content :)

  • @devenvaru
    @devenvaru Год назад

    God bless you brother, for 6 days i was figuring out why it was not working but it was so simple and I can finally move on. Thank you

    • @Randomcode_0
      @Randomcode_0  Год назад

      I'm glad you figured it out! Wishing you the best as you move forward.

  • @bystruska8560
    @bystruska8560 2 года назад

    This vide saved me at least 3 times :D I allways run into this problem and then im searching for this video :D best video on the internet.

    • @Randomcode_0
      @Randomcode_0  2 года назад

      Great to hear! I do that all the time as well :D

  • @AnotherEmptyDream
    @AnotherEmptyDream Год назад

    I love you. Thank you. so. much!