How do I check installed JARs, external libraries, etc. on three different Java IDEs?

前端 未结 2 1453
轻奢々
轻奢々 2021-01-21 15:53

I\'ve written programs in several languages and have tutored students in computer science, but just starting to learn Java on my MacBook. Regarding this question, I\'d be happy

2条回答
  •  萌比男神i
    2021-01-21 16:26

    Maven

    Question: I'd also like advice on the right way, or simplest/cleanest way, to install external JARs.

    If you really wanna work in a organised way and wanna focus completely on coding rather than looking for dependencies to work with , then try building your projects with Apache Maven. The magic wand of Maven projects are pom.xml file where all magic happens depending upon your wish.

    Maven is a build automation tool used primarily for Java projects. Maven addresses two aspects of building software:

    • Describes and manages how software is built.
    • Describes and manages dependencies (various libraries used by your code).

    Why Maven:

    1. De facto standard
    2. Able to compile, test, pack and distribute source code ( different Goals)
    3. Robust dependency management (Most important from my point of view)
    4. Extensible via plugin
    5. Good community support and many fan boys around.
    6. The big 3 IDEs (IntelliJ, NetBeans, and Eclipse) all having good support for Maven, letting you use Maven as a substitute for their own proprietary project definition and build process.
    7. Maven famously caches all of its dependencies in the ~/.m2 directory, which is sometimes called the local Maven repository. Maven local repository keeps your project's all dependencies (library jars, plugin jars etc.). When you run a Maven build, then Maven automatically downloads all the dependency jars into the local repository. It helps to avoid references to dependencies stored on remote machine every time a project is build.

    You can simply deploy your project as JAR, WAR, or EAR file and use it on different IDEs or as standalone.

提交回复
热议问题