You can package your application into a JAR file using the JDK’s jar tool. As with all things Java, you can do this from the command line, but IntelliJ IDEA makes it easier.
- [Instructor] You can package your application…into a JAR archive file using the JDK's JAR Tool.…As with all things Java, though,…you can do this from the command line,…but a good Java IDE will make it easier.…Here's how to build a JAR file in IntelliJ IDEA.…I'm starting in an application that has multiple classes,…Main and Person, and also has a dependent library,…the Gson library that I integrated earlier.…I'll test the application to make sure it works.…And if that Run button isn't enabled for you,…go to the menu and choose Run…and then the second Run menu choice and choose Main.…
So now I've verified that the application will run,…and I'm ready to create the JAR file.…I'll go to my Project Structure dialog,…and I'll click on the Artifacts category.…I'll click Plus.…Then I'll choose JAR.…And then From modules with dependencies.…My module JAR file has a dependency, the Gson library.…I need to select my Main class,…the class that contains my Main method.…I'll browse and choose Main.…For JAR files from libraries, you have two options.…
Author
Released
4/19/2017- Exploring IntelliJ IDEA editions
- Installing IntelliJ IDEA on macOS and Windows
- Configuring IntelliJ IDEA
- Creating new projects
- Importing an Eclipse project
- Exploring the user interface
- Editing and debugging code
- Building, compiling, and packaging Java projects
- Managing multiple branches with Git
- Programming with Groovy, Scala, and Kotlin
Skill Level Beginner
Duration
Views
Related Courses
-
Learning Java Applications
with Todd Perkins2h 14m Beginner -
Java 7 Essential Training
with David Gassner6h 4m Beginner -
Code Clinic: Java
with Patrick Royal1h 33m Intermediate -
Java: IDE Overview
with Peggy Fisher3h 17m Beginner
-
Introduction
-
Welcome57s
-
-
1. Getting Started
-
Manage IntelliJ IDEA updates2m 35s
-
Configure IntelliJ IDEA3m 32s
-
Create new projects3m 30s
-
Get online help3m 21s
-
2. Migrate from Other Environments
-
Import an Eclipse project3m 34s
-
Import other Java projects2m 26s
-
-
3. Explore the User Interface
-
Explore the editor window5m 28s
-
Explore the project window2m 53s
-
Use other tool windows3m 55s
-
Manage the window layout2m 48s
-
-
4. Edit and Debug Code
-
Generate code3m 44s
-
Navigate code and find files3m 27s
-
Refactor code3m 23s
-
Analyze code2m 11s
-
Store code in scratch files2m 39s
-
Debug with breakpoints3m 31s
-
Inspect variable values3m 12s
-
5. Build, Compile, and Package Java Projects
-
Package classes in JAR files3m 27s
-
6. Use Software Version Control
-
Install Git1m 8s
-
Share code snippets as Gists2m 39s
-
-
7. Program with Other JVM Languages
-
Program with Groovy5m 45s
-
Program with Scala4m 53s
-
Program with Kotlin4m 20s
-
-
Conclusion
-
Next steps55s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Package classes in JAR files