Thank you very, very, very much bro! You clarified what was obscure for me for days. I have completed the "maven part" of a project so easily based on your explanation, just super👍👍👍
Overall a great video, easy to understand, no weird music and audio is good and steps outlined that were easy to follow. I also love that you explained the errors so that eliminated some rabbit-holing research for me.
Muchísimas gracias, estoy contento de que te haya sido de ayuda. Tengo planes de crear una versión en español de mi canal con el mejor contenido seleccionado. Espero lanzarla en las próximas semanas.
Hi, I've recently started using Maven on an existing InteliJ project. I've always used the Build artifact function to build ther jar file and wrap it into exe file. Now, with the new maven version of the project the artifact is not created when I choose Build. I've checked the steps countless times and it does not work. Can you help? I'm happy to provide any aditional info, if that helps.
Hi @petarbutrakov315 The response for this is a bit more than a usual reply. I added a post here that walks you through some steps I hope will help. Let me know. Thanks for watching!! ruclips.net/channel/UChV1b3e3HgrZmx5cTBx8OEwcommunity?pvf=CAI%253D
You need to ensure that your resources, such as text files and images, are included in the JAR file and correctly referenced within your code. Maven uses the resources section in the pom.xml file to specify the location of these resources. Additionally, you'll need to access these resources using the appropriate method in your Java code. A good topic for a video I think.
Hello, i tried this tutorial. But when i tried to run the jar named MyFirstApp-1.0-SNAPSHOT.jar at the target folder still gives the no main manifest error. Is there a way to run this without adding Manifest parameter ?
I'm sorry to hear you're encountering this issue. The 'no main manifest attribute' error usually indicates that the main class wasn't specified in the JAR's manifest. You could double-check your Maven pom.xml configuration or IntelliJ's Artifact settings to ensure the main class is correctly set. If you've followed all the steps in the video, a clean rebuild might also help. Let me know if you continue to face this issue, and I'll do my best to assist you further.
If I understand, you are talking about around the 6:16 minute mark in the video? Maven should download the dependencies and show them there. If they are not, it could be because Maven hasn't pulled the files from central yet. Look for the Maven symbol with a 'recycle' arrow and click that to initiate the download, or run mvn build from the command line maybe to get the dependencies. I have a Discord channel linked on my channel if you want to talk in more detail. Good luck and thanks for watching!
Amazing video ❤ How to add JavaFX dependencies though? I created a project built through Maven, and implemented JavaFX functionalities through Scenebuilder. The app runs fine through IntelliJ, however the JAR file doesn’t run. It says “could not run the file because of missing JavaFX properties “. Looking forward to hearing from you.
Hi Rohit, thanks for watching the video. Since Java 11, JavaFX has been modularized and is not part of the standard Java libraries, so you need to include it yourself. I count 8 modules here: mvnrepository.com/artifact/org.openjfx Not sure which ones you will need, I'd start with a few like Base, Controls and graphics maybe and see what happens. To add them to your project in the dependencies section of your poml.xml file, you'll add something like this:
org.openjfx javafx-controls 20
org.openjfx javafx-fxml 20
org.openjfx javafx-base 20
I suggest version 20 to start with. It looks like the latest stable release. Take care and good luck!! -Brian
Hello, sure. Here are some things to try: 1) check to see that the packaging element in your pom.xml is set to jar 2) Did you run mvn package or install which usually create a jar, 3) did you get an error message and if so what is it 4) check the target directory to see if the jar was created. Let me know if anything worked.
Hey, Brian! Thanks for this video. I'm working on a JavaFX project, with dependencies and I have to add the "--module VM options" to Run. It's working fine and I've created the JAR file. The problem is to Run my jar file.. I had to create a .bat file with modules path and the VM options. So I'm just able to Run my JAR file executing the .bat file.. I've been trying to add the VM options in differentes Maven Pluging in pom.xml file, but It's not working. Do you have any idea about it? SDK 17 Thanks anyway!
Hey Bruno! First of all, thanks for watching the video! There are a couple of solutions you might want to try. Let me start with the best one for your situation. Since you're using SDK 17, consider using jpackage, a tool introduced in Java 14 for packaging self-contained Java applications. jpackage can create native installers and executables for your application, including all necessary dependencies and VM options. This tool is part of the JDK and is specifically designed for packaging applications like JavaFX. I don't have a video on this, but it seems like a great topic for one! Give it a try and let me know if it works for you. Take care!!
@@beginsecure Thanks so much for answer so fast. I'll try it tomorrow and bring new to you. But I think a tutorial doing this would be helpfull for JavaFX community, because I really try to find, but without success and it seems to be frequent. Thanks again and I'll be back soon! Take care!
The error you're encountering, Could not find or load main class com.beginsecure.App followed by java.lang.ClassNotFoundException: com.beginsecure.App, suggests that the Java runtime is unable to locate the specified class. Double-check the spelling and casing of your package and class names in both your Java file and any place you reference it. Java is case-sensitive, making this a common pitfall.
Thanks for reaching out. I have a GitHub account set up for posting files, but I need to be more diligent in keeping up with each video. I'll post the content for this video and a few others this weekend and add a link in the video descriptions. I'll post the link here as a reply too. Happy Holidays!!
Hmmm...interesting question, it might be a project set up issue. Orange is the color for excluded folders. IntelliJ excludes indirect dependencies automatically as you shouldn't be importing those. Also, having the indirect dependencies excluded also speeds up the search. If the code builds and you are able to run the code you should be fine. Thanks for watching!
@@beginsecure i was still able to build the jar successfully and did a release using github for my text adventure game. can you tell me more about "might be a project set up issue"? what do you mean by that?
Just a thought, since the folder was orange, maybe it was not an excluded folder. Shouldn't be a problem and it sounds like you have it working fine. Congrats!
This is the perfect tutorial everything i needed is included good mic quality easy to understand and follow Thanks
Glad it helped! Thanks for watching!
Best shifu ever. Teaches with common exceptions and shows how he did with his way around, no one does that
Thanks for feedback, really appreciate it!! All the best!!
Thank you very, very, very much bro! You clarified what was obscure for me for days. I have completed the "maven part" of a project so easily based on your explanation, just super👍👍👍
Excellent! Glad it helped. Take care!!
Overall a great video, easy to understand, no weird music and audio is good and steps outlined that were easy to follow. I also love that you explained the errors so that eliminated some rabbit-holing research for me.
Glad it helped, thanks for watching!!
Useful tutorial. Really helped me resolve an issue, I was googling for hours...👍
Glad it helped!! Happy New Year!!
Busque mucho saber esto y por fin encuentro algo que sirve realmente, felicitaciones, muy buen video
Muchísimas gracias, estoy contento de que te haya sido de ayuda. Tengo planes de crear una versión en español de mi canal con el mejor contenido seleccionado. Espero lanzarla en las próximas semanas.
Very good video, Got a clear idea about the creation of a jar file and its execution
Glad it helped! Thanks for watching!
I wish i could like it twice especially for the bonus
Hahah..me too. Thanks, love that!!
Superb tutorial. Thanks 👍
Glad you liked it! Thanks for watching!
hello nice sharing
Thanks for watching!
Wow, impressive video, great job!
Thanks so much for your kind words, and thanks for watching!!
Simply Perfect.
Thank you!!
easy to understand, thanks 🤙
Glad it helped! Thanks for watching!
Thank you! You helped me a lot!
Great to hear that it helped!! Take care!!
Hi, I've recently started using Maven on an existing InteliJ project. I've always used the Build artifact function to build ther jar file and wrap it into exe file. Now, with the new maven version of the project the artifact is not created when I choose Build. I've checked the steps countless times and it does not work. Can you help? I'm happy to provide any aditional info, if that helps.
Hi @petarbutrakov315 The response for this is a bit more than a usual reply. I added a post here that walks you through some steps I hope will help. Let me know. Thanks for watching!! ruclips.net/channel/UChV1b3e3HgrZmx5cTBx8OEwcommunity?pvf=CAI%253D
what about when I have resources like text files and images? it doesnt appear when I run my jar file
You need to ensure that your resources, such as text files and images, are included in the JAR file and correctly referenced within your code. Maven uses the resources section in the pom.xml file to specify the location of these resources. Additionally, you'll need to access these resources using the appropriate method in your Java code. A good topic for a video I think.
👋🏼🇨🇴🧔🏻👍🏼🤝🏼 Saludos desde Colombia.
¡Gracias por ver!
Hello, i tried this tutorial. But when i tried to run the jar named MyFirstApp-1.0-SNAPSHOT.jar at the target folder still gives the no main manifest error. Is there a way to run this without adding Manifest parameter ?
I'm sorry to hear you're encountering this issue. The 'no main manifest attribute' error usually indicates that the main class wasn't specified in the JAR's manifest. You could double-check your Maven pom.xml configuration or IntelliJ's Artifact settings to ensure the main class is correctly set. If you've followed all the steps in the video, a clean rebuild might also help. Let me know if you continue to face this issue, and I'll do my best to assist you further.
how did you get Dependencies tab, the one after Build? I am running latest IntelliJ with Maven plugins (all 3 of them)
If I understand, you are talking about around the 6:16 minute mark in the video? Maven should download the dependencies and show them there. If they are not, it could be because Maven hasn't pulled the files from central yet. Look for the Maven symbol with a 'recycle' arrow and click that to initiate the download, or run mvn build from the command line maybe to get the dependencies. I have a Discord channel linked on my channel if you want to talk in more detail. Good luck and thanks for watching!
Amazing video ❤
How to add JavaFX dependencies though? I created a project built through Maven, and implemented JavaFX functionalities through Scenebuilder. The app runs fine through IntelliJ, however the JAR file doesn’t run. It says “could not run the file because of missing JavaFX properties “. Looking forward to hearing from you.
Hi Rohit, thanks for watching the video. Since Java 11, JavaFX has been modularized and is not part of the standard Java libraries, so you need to include it yourself. I count 8 modules here: mvnrepository.com/artifact/org.openjfx Not sure which ones you will need, I'd start with a few like Base, Controls and graphics maybe and see what happens. To add them to your project in the dependencies section of your poml.xml file, you'll add something like this:
org.openjfx
javafx-controls
20
org.openjfx
javafx-fxml
20
org.openjfx
javafx-base
20
I suggest version 20 to start with. It looks like the latest stable release. Take care and good luck!!
-Brian
Thank you :)
You're welcome! Thanks for watching!!
I added assembly plugin but its not reflected in MAVEN tab of IntellIJ
Try refreshing or reloading the project so Maven will download what it needs.
luv u!
Thanks, glad the video helped!
JavaFX runtime components are missing, and are required to run this application
This error took the sleep from my eyes.
See if this recent JavaFX video helps you: ruclips.net/video/UOFmZxdte2g/видео.html
I've created a new hello world app but the build artifact doesn't create a jar file. can you help?
Hello, sure. Here are some things to try: 1) check to see that the packaging element in your pom.xml is set to jar 2) Did you run mvn package or install which usually create a jar, 3) did you get an error message and if so what is it 4) check the target directory to see if the jar was created. Let me know if anything worked.
Hey, Brian! Thanks for this video. I'm working on a JavaFX project, with dependencies and I have to add the "--module VM options" to Run. It's working fine and I've created the JAR file. The problem is to Run my jar file.. I had to create a .bat file with modules path and the VM options. So I'm just able to Run my JAR file executing the .bat file.. I've been trying to add the VM options in differentes Maven Pluging in pom.xml file, but It's not working.
Do you have any idea about it?
SDK 17
Thanks anyway!
Hey Bruno! First of all, thanks for watching the video!
There are a couple of solutions you might want to try. Let me start with the best one for your situation. Since you're using SDK 17, consider using jpackage, a tool introduced in Java 14 for packaging self-contained Java applications. jpackage can create native installers and executables for your application, including all necessary dependencies and VM options. This tool is part of the JDK and is specifically designed for packaging applications like JavaFX. I don't have a video on this, but it seems like a great topic for one!
Give it a try and let me know if it works for you. Take care!!
@@beginsecure Thanks so much for answer so fast. I'll try it tomorrow and bring new to you. But I think a tutorial doing this would be helpfull for JavaFX community, because I really try to find, but without success and it seems to be frequent.
Thanks again and I'll be back soon! Take care!
Hi Brian!
I tried all day to apply jpackage, but it still requires .bat or run by terminal. I'll send you more informations on Discord!
Error: Could not find or load main class com.beginsecure.App
Caused by: java.lang.ClassNotFoundException: com.beginsecure.App
i am facing this error
Also getting this, while trying to compile it using maven
The error you're encountering, Could not find or load main class com.beginsecure.App followed by java.lang.ClassNotFoundException: com.beginsecure.App, suggests that the Java runtime is unable to locate the specified class. Double-check the spelling and casing of your package and class names in both your Java file and any place you reference it. Java is case-sensitive, making this a common pitfall.
I have a video that talks all about this error. Start about 3 minutes in to skip the boring part: ruclips.net/video/meEnY-7t1bc/видео.html
Will this include source code (.java files), and if not how can I include them?
Thank you.
Thanks for reaching out. I have a GitHub account set up for posting files, but I need to be more diligent in keeping up with each video. I'll post the content for this video and a few others this weekend and add a link in the video descriptions. I'll post the link here as a reply too. Happy Holidays!!
I just added the repo here:
github.com/BeginSecure/IntelliJExecutableJar.git
Happy New Year!!
@ 13:02 my out folder is not orange, is this a problem?
Hmmm...interesting question, it might be a project set up issue. Orange is the color for excluded folders. IntelliJ excludes indirect dependencies automatically as you shouldn't be importing those. Also, having the indirect dependencies excluded also speeds up the search. If the code builds and you are able to run the code you should be fine. Thanks for watching!
@@beginsecure i was still able to build the jar successfully and did a release using github for my text adventure game. can you tell me more about "might be a project set up issue"? what do you mean by that?
Just a thought, since the folder was orange, maybe it was not an excluded folder. Shouldn't be a problem and it sounds like you have it working fine. Congrats!
hi,
need help, can you ?
Post your question and let's see.