Use IntelliJ IDEA to create an EXECUTABLE JAR With Dependencies Using Maven

  Рет қаралды 44,393

Begin Secure

Begin Secure

Күн бұрын

Пікірлер: 70
@user-kj3is6li2n
@user-kj3is6li2n 2 жыл бұрын
This is the perfect tutorial everything i needed is included good mic quality easy to understand and follow Thanks
@beginsecure
@beginsecure 2 жыл бұрын
Glad it helped! Thanks for watching!
@actaeon5770
@actaeon5770 9 ай бұрын
Best shifu ever. Teaches with common exceptions and shows how he did with his way around, no one does that
@beginsecure
@beginsecure 9 ай бұрын
Thanks for feedback, really appreciate it!! All the best!!
@miggiegarcia6213
@miggiegarcia6213 Жыл бұрын
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.
@beginsecure
@beginsecure Жыл бұрын
Glad it helped, thanks for watching!!
@ulugbektoshmatov3433
@ulugbektoshmatov3433 Жыл бұрын
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👍👍👍
@beginsecure
@beginsecure Жыл бұрын
Excellent! Glad it helped. Take care!!
@mrprjudit
@mrprjudit Жыл бұрын
Useful tutorial. Really helped me resolve an issue, I was googling for hours...👍
@beginsecure
@beginsecure Жыл бұрын
Glad it helped!! Happy New Year!!
@ypathan420
@ypathan420 5 күн бұрын
you are life saver my friend
@beginsecure
@beginsecure 5 күн бұрын
That's great to hear it helped. All the best!!
@pranayreddy8690
@pranayreddy8690 7 ай бұрын
Very good video, Got a clear idea about the creation of a jar file and its execution
@beginsecure
@beginsecure 7 ай бұрын
Glad it helped! Thanks for watching!
@gokulbhardwaj6559
@gokulbhardwaj6559 Күн бұрын
Add dependency option is not available
@kh0lis
@kh0lis 10 ай бұрын
Superb tutorial. Thanks 👍
@beginsecure
@beginsecure 10 ай бұрын
Glad you liked it! Thanks for watching!
@krystiansereda539
@krystiansereda539 2 жыл бұрын
Wow, impressive video, great job!
@beginsecure
@beginsecure 2 жыл бұрын
Thanks so much for your kind words, and thanks for watching!!
@TaylorMosqueraCastro
@TaylorMosqueraCastro 10 ай бұрын
Busque mucho saber esto y por fin encuentro algo que sirve realmente, felicitaciones, muy buen video
@beginsecure
@beginsecure 10 ай бұрын
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.
@MaxXPlagiarism
@MaxXPlagiarism Жыл бұрын
I wish i could like it twice especially for the bonus
@beginsecure
@beginsecure Жыл бұрын
Hahah..me too. Thanks, love that!!
@senya1696
@senya1696 Жыл бұрын
Thank you! You helped me a lot!
@beginsecure
@beginsecure Жыл бұрын
Great to hear that it helped!! Take care!!
@ylmazmehmeth
@ylmazmehmeth 2 жыл бұрын
easy to understand, thanks 🤙
@beginsecure
@beginsecure 2 жыл бұрын
Glad it helped! Thanks for watching!
@tej_3423
@tej_3423 Жыл бұрын
Simply Perfect.
@beginsecure
@beginsecure Жыл бұрын
Thank you!!
@Itskaintmeenu
@Itskaintmeenu 2 жыл бұрын
hello nice sharing
@beginsecure
@beginsecure 2 жыл бұрын
Thanks for watching!
@petarbutrakov315
@petarbutrakov315 Жыл бұрын
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.
@beginsecure
@beginsecure Жыл бұрын
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!! kzbin.info/door/hV1b3e3HgrZmx5cTBx8OEwcommunity?pvf=CAI%253D
@dominikbreksa343
@dominikbreksa343 2 жыл бұрын
Thank you :)
@beginsecure
@beginsecure 2 жыл бұрын
You're welcome! Thanks for watching!!
@mondoshigua
@mondoshigua 2 жыл бұрын
👋🏼🇨🇴🧔🏻👍🏼🤝🏼 Saludos desde Colombia.
@beginsecure
@beginsecure 2 жыл бұрын
¡Gracias por ver!
@Dario-v9x
@Dario-v9x Жыл бұрын
how did you get Dependencies tab, the one after Build? I am running latest IntelliJ with Maven plugins (all 3 of them)
@beginsecure
@beginsecure Жыл бұрын
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!
@miggiegarcia6213
@miggiegarcia6213 Жыл бұрын
@ 13:02 my out folder is not orange, is this a problem?
@beginsecure
@beginsecure Жыл бұрын
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!
@miggiegarcia6213
@miggiegarcia6213 Жыл бұрын
@@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?
@beginsecure
@beginsecure Жыл бұрын
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!
@wilmercuevas6491
@wilmercuevas6491 7 ай бұрын
what about when I have resources like text files and images? it doesnt appear when I run my jar file
@beginsecure
@beginsecure 7 ай бұрын
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.
@Yubilsal
@Yubilsal Жыл бұрын
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 ?
@beginsecure
@beginsecure Жыл бұрын
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.
@rohitchanda8461
@rohitchanda8461 Жыл бұрын
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.
@beginsecure
@beginsecure Жыл бұрын
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
@harshitasarathe9554
@harshitasarathe9554 Жыл бұрын
I added assembly plugin but its not reflected in MAVEN tab of IntellIJ
@beginsecure
@beginsecure Жыл бұрын
Try refreshing or reloading the project so Maven will download what it needs.
@brunosalatalima1182
@brunosalatalima1182 Жыл бұрын
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!
@beginsecure
@beginsecure Жыл бұрын
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!!
@brunosalatalima1182
@brunosalatalima1182 Жыл бұрын
@@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!
@brunosalatalima1182
@brunosalatalima1182 Жыл бұрын
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!
@rafaeljacovmedel8953
@rafaeljacovmedel8953 Жыл бұрын
I've created a new hello world app but the build artifact doesn't create a jar file. can you help?
@beginsecure
@beginsecure Жыл бұрын
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.
@ihorvolkov5600
@ihorvolkov5600 2 жыл бұрын
Will this include source code (.java files), and if not how can I include them? Thank you.
@beginsecure
@beginsecure 2 жыл бұрын
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!!
@beginsecure
@beginsecure 2 жыл бұрын
I just added the repo here: github.com/BeginSecure/IntelliJExecutableJar.git Happy New Year!!
@Jack-t6n
@Jack-t6n 11 ай бұрын
Error: Could not find or load main class com.beginsecure.App Caused by: java.lang.ClassNotFoundException: com.beginsecure.App i am facing this error
@matheusdesouza565
@matheusdesouza565 11 ай бұрын
Also getting this, while trying to compile it using maven
@beginsecure
@beginsecure 10 ай бұрын
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.
@beginsecure
@beginsecure 10 ай бұрын
I have a video that talks all about this error. Start about 3 minutes in to skip the boring part: kzbin.info/www/bejne/o5aon4xjbNlkmMU
@dawidus443
@dawidus443 9 ай бұрын
luv u!
@beginsecure
@beginsecure 9 ай бұрын
Thanks, glad the video helped!
@Hmada_BJ
@Hmada_BJ Жыл бұрын
JavaFX runtime components are missing, and are required to run this application This error took the sleep from my eyes.
@beginsecure
@beginsecure Жыл бұрын
See if this recent JavaFX video helps you: kzbin.info/www/bejne/i4Cpno2umdmYaMk
@FAZALRAHMAN-xn9tw
@FAZALRAHMAN-xn9tw Жыл бұрын
hi, need help, can you ?
@beginsecure
@beginsecure Жыл бұрын
Post your question and let's see.
Maven Complete Tutorial with IntelliJ
38:17
Programming Techie
Рет қаралды 127 М.
Java Unit Testing with JUnit - Tutorial - How to Create And Use Unit Tests
21:35
She made herself an ear of corn from his marmalade candies🌽🌽🌽
00:38
Valja & Maxim Family
Рет қаралды 18 МЛН
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН
UFC 310 : Рахмонов VS Мачадо Гэрри
05:00
Setanta Sports UFC
Рет қаралды 1,2 МЛН
How to CREATE an EXECUTABLE JAR With Dependencies Using Maven
9:17
Begin Secure
Рет қаралды 3,5 М.
How to create a Fat or Uber executable jar using Maven
10:39
raksrahul
Рет қаралды 2 М.
Writing My Own Database From Scratch
42:00
Tony Saro
Рет қаралды 265 М.
How to create Runnable JAR File from Selenium Project || Executable JAR file
18:08
Gradle Course for Beginners | Get Going with Gradle
56:59
Tom Gregory Tech
Рет қаралды 38 М.
Java executable (.jar) ☕
8:37
Bro Code
Рет қаралды 143 М.
Gradle Was Hard Until I Learnt This INSANE Secret
6:16
Tom Gregory Tech
Рет қаралды 54 М.
Learn Java in 15 Minutes (seriously)
19:50
ForrestKnight
Рет қаралды 171 М.
Simple Explanation of Maven and pom.xml
17:37
Brandan Jones
Рет қаралды 232 М.
She made herself an ear of corn from his marmalade candies🌽🌽🌽
00:38
Valja & Maxim Family
Рет қаралды 18 МЛН