java - Should I package the tool class I made into a jar and reference it every time, or should I paste the code every time I use it?
过去多啦不再A梦
过去多啦不再A梦 2017-06-23 09:13:16
0
4
768

I just started writing programs in Java. I wrote several tool classes of my own based on our projects. It is relatively simple to package them into jars and use them every time. However, if there are any modifications, we need to open a separate project for the tool classes; if every time The advantage of copying the tool code is that it can be changed at any time. I don’t know what other differences there are in the use of these two tool types. Please give me some advice.

过去多啦不再A梦
过去多啦不再A梦

reply all(4)
小葫芦

1. The tool classes that are packaged into jar packages are basically the result of a large number of scenarios. Such tool classes are rarely modified. In the situation you mentioned, those tool classes are not yet mature, so it is still difficult to package them into jar packages. It's not appropriate enough because there are scenes that need to be modified and added.
2. If there are only a few tool classes, I personally think it is more convenient without using the jar package.
3. Large-scale projects are generally jar packages, which are unified.

代言

If it is a tool class that is only useful for your project, then it will naturally be placed in your project. Why create a separate tool class project?

If you think that these tool classes may have a certain degree of versatility and can be used in other places in the future, then put them in a separate project, introduce them as dependent projects in eclipse, and then type them when they are actually released. JAR package.

扔个三星炸死你

Packaging is an inevitable trend, just let it take its course.

漂亮男人

Frequently modified instructions are not general enough. . .

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!