From the course: IntelliJ IDEA Community Edition Essential Training

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Package classes in JAR files

Package classes in JAR files

From the course: IntelliJ IDEA Community Edition Essential Training

Start my 1-month free trial

Package classes in JAR files

[instructor] When you're finished with a Java Based Application in IntelliJ IDEA, and you're ready to distribute it you're going to package it in a JAR File. That's a Zip Style Archive file and IntelliJ IDEA Will give you all the tools you need to define and generate the file. I'm working in a brand new project with just a main method. And I'll just add a little bit of code, I'll call System Out and pass in Hello from the JAR File. Now I'll run the application just to make sure everything works as expected. And I see that Output. In order to define the JAR File, go to your Project Structure Dialogue, from there Click on Artifacts and then Click the Plus button, choose Jar. And then from Modules with dependencies, select the Module that you want to put into the JAR File, then browse and select the Class you want to execute as the JAR File starts up. You can accept all the other Default settings and Click Okay.Then…

Contents