Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to package java Project into jar package in intellij idea

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article introduces the relevant knowledge of "how to make a java project into a jar package in intellij idea". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

The steps are as follows:

* File- > PorjectStructure

* Select Artifects in ProjectSetings. Click the + sign to select the Empty option in the jar file

* modify the name of the jar file in the Name option. * then click the CreatManifest button below, and click ok (should be the current project by default)

* Click the folder icon to the right of Main Class, select the entry class of the current project, that is, the class where the main function is located, and click ok

* double-click the compiled resource file in the AvailableElements column on the right to enter it into the jar package on the left

* Click BuildArtifacts in the Build option

* Click the Build option. * here the Build option is the first time to build jar,Rebuild is modified to rebuild jar,clean is to delete jar.

* here we can see the generated jar package

* enter the directory where the jar package is located, enter cmd in the address bar and press enter to enter the command line

* execute the command as shown in the figure to run the jar file

This is the end of the introduction of "how to make a java project into a jar package in intellij idea". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report