In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces the java project how to introduce other jar packages, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
Tools.jar is a newly typed toolkit, now import it into the project.
Step 1 lib directory
Basically every java project has a lib directory. We create this directory and throw the jar package into it.
The purpose of the lib directory is to store third-party jar packages.
Step 2 modify the compilation script
Mkdir classesjavac-classpath.; D:\ java18\ cstmgr;D:\ java18\ cstmgr\ lib\ tools.jar-d D:\ java18\ cstmgr\ classes * .javajavac-classpath.; D:\ java18\ cstmgr;D:\ java18\ cstmgr\ lib\ tools.jar-d D:\ java18\ cstmgr\ classes entity\ * .javapause
Instead of compiling the java class in the tool folder, just add the jar package to classpath.
Step 3 compile the cstmgr project
Step 4 New mode of operation
When we come to the classes folder, we need to change the operation mode. One more step is to add the path of the jar package. Note that the path of the jar package needs to end with * *; * *.
-cp is the path where the jar package is introduced.
Step 5: mkdir classesjavac-classpath.; D:\ java18\ cstmgr;D:\ java18\ cstmgr\ lib\ tools.jar-d D:\ java18\ cstmgr\ classes * .javajavac-classpath.; D:\ java18\ cstmgr;D:\ java18\ cstmgr\ lib\ tools.jar-d D:\ java18\ cstmgr\ classes entity\ *. Javacd classesjava-cp D:\ java18\ cstmgr\ lib\ tools.jar; Applicationpause
Rerun.
Thank you for reading this article carefully. I hope the article "how to introduce other jar packages into java Project" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support and follow the industry information channel. More related knowledge is waiting for you to learn!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.