Тёмный

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

Begin Secure
Подписаться 2,8 тыс.
Просмотров 42 тыс.
50% 1

Опубликовано:

 

28 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 67   
@user-kj3is6li2n
@user-kj3is6li2n Год назад
This is the perfect tutorial everything i needed is included good mic quality easy to understand and follow Thanks
@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!!
@krystiansereda539
@krystiansereda539 Год назад
Wow, impressive video, great job!
@beginsecure
@beginsecure Год назад
Thanks so much for your kind words, and thanks for watching!!
@ylmazmehmeth
@ylmazmehmeth 2 года назад
easy to understand, thanks 🤙
@beginsecure
@beginsecure 2 года назад
Glad it helped! Thanks for watching!
@TaylorMosqueraCastro
@TaylorMosqueraCastro 7 месяцев назад
Busque mucho saber esto y por fin encuentro algo que sirve realmente, felicitaciones, muy buen video
@beginsecure
@beginsecure 7 месяцев назад
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.
@mondoshigua
@mondoshigua Год назад
👋🏼🇨🇴🧔🏻👍🏼🤝🏼 Saludos desde Colombia.
@beginsecure
@beginsecure Год назад
¡Gracias por ver!
@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
@Jack-t6n
@Jack-t6n 7 месяцев назад
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 7 месяцев назад
Also getting this, while trying to compile it using maven
@beginsecure
@beginsecure 7 месяцев назад
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 7 месяцев назад
I have a video that talks all about this error. Start about 3 minutes in to skip the boring part: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-meEnY-7t1bc.html
@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.
@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!!
@wilmercuevas6491
@wilmercuevas6491 4 месяца назад
what about when I have resources like text files and images? it doesnt appear when I run my jar file
@beginsecure
@beginsecure 4 месяца назад
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.
@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!! ru-vid.com/show-UChV1b3e3HgrZmx5cTBx8OEwcommunity?pvf=CAI%253D
@MaxXPlagiarism
@MaxXPlagiarism Год назад
I wish i could like it twice especially for the bonus
@beginsecure
@beginsecure Год назад
Hahah..me too. Thanks, love that!!
@mrprjudit
@mrprjudit 9 месяцев назад
Useful tutorial. Really helped me resolve an issue, I was googling for hours...👍
@beginsecure
@beginsecure 9 месяцев назад
Glad it helped!! Happy New Year!!
@Dawid-qk2em
@Dawid-qk2em 5 месяцев назад
luv u!
@beginsecure
@beginsecure 5 месяцев назад
Thanks, glad the video helped!
@nitw_pranayreddyannam7867
@nitw_pranayreddyannam7867 4 месяца назад
Very good video, Got a clear idea about the creation of a jar file and its execution
@beginsecure
@beginsecure 4 месяца назад
Glad it helped! Thanks for watching!
@kh0lis
@kh0lis 7 месяцев назад
Superb tutorial. Thanks 👍
@beginsecure
@beginsecure 7 месяцев назад
Glad you liked it! Thanks for watching!
@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: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-UOFmZxdte2g.html
@senya1696
@senya1696 Год назад
Thank you! You helped me a lot!
@beginsecure
@beginsecure Год назад
Great to hear that it helped!! Take care!!
@FAZALRAHMAN-xn9tw
@FAZALRAHMAN-xn9tw Год назад
hi, need help, can you ?
@beginsecure
@beginsecure Год назад
Post your question and let's see.
@dominikbreksa343
@dominikbreksa343 Год назад
Thank you :)
@beginsecure
@beginsecure Год назад
You're welcome! Thanks for watching!!
@Dario-v9x
@Dario-v9x 11 месяцев назад
how did you get Dependencies tab, the one after Build? I am running latest IntelliJ with Maven plugins (all 3 of them)
@beginsecure
@beginsecure 11 месяцев назад
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!
@harshitasarathe9554
@harshitasarathe9554 10 месяцев назад
I added assembly plugin but its not reflected in MAVEN tab of IntellIJ
@beginsecure
@beginsecure 9 месяцев назад
Try refreshing or reloading the project so Maven will download what it needs.
@brunosalatalima1182
@brunosalatalima1182 10 месяцев назад
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 10 месяцев назад
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 10 месяцев назад
@@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 10 месяцев назад
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!
@ihorvolkov5600
@ihorvolkov5600 Год назад
Will this include source code (.java files), and if not how can I include them? Thank you.
@beginsecure
@beginsecure Год назад
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 Год назад
I just added the repo here: github.com/BeginSecure/IntelliJExecutableJar.git Happy New Year!!
@Itskaintmeenu
@Itskaintmeenu 2 года назад
hello nice sharing
@beginsecure
@beginsecure 2 года назад
Thanks for watching!
@tej_3423
@tej_3423 Год назад
Simply Perfect.
@beginsecure
@beginsecure Год назад
Thank you!!
@actaeon5770
@actaeon5770 6 месяцев назад
Best shifu ever. Teaches with common exceptions and shows how he did with his way around, no one does that
@beginsecure
@beginsecure 6 месяцев назад
Thanks for feedback, really appreciate it!! All the best!!
@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!
Далее
Maven Complete Tutorial with IntelliJ
38:17
Просмотров 124 тыс.
Watermelon magic box! #shorts by Leisi Crazy
00:20
Просмотров 14 млн
Bearwolf - GODZILLA Пародия Beatrise
00:33
Просмотров 78 тыс.
Brilliant Budget-Friendly Tips for Car Painting!
00:28
How To Create An Executable Python Program
3:48
Просмотров 3,6 тыс.
Java executable (.jar) ☕
8:37
Просмотров 132 тыс.
Maven Assembly Plugin
13:04
Просмотров 24 тыс.
programming projects that taught me how to code
9:49
Просмотров 293 тыс.
JavaFX App To Runnable JAR, The Easy Way! (Video #1)
12:31
Generate Jar File in Spring Boot through InteliJ
5:27
Просмотров 2,2 тыс.