我是 java 的新手,我正在尝试构建一个具有外部依赖项的项目。当我尝试构建它时
[javac] Compiling 814 source files to ~/Desktop/Dev/bitcoinj/out
[javac] ~/Desktop/Dev/bitcoinj/src/com/google/bitcoin/core/Block.java:25: package org.slf4j does not exist
[javac] import org.slf4j.Logger;
[javac] ...
如何安装丢失的外部包?有没有类似python pip
的java包管理器?
最佳答案
你可以使用 maven这会做 dependency handling并为你 build 。
Dependency management is a core feature of Maven. Managing dependencies for a single project is easy. Managing dependencies for multi-module projects and applications that consist of hundreds of modules is possible. Maven helps a great deal in defining, creating, and maintaining reproducible builds with well-defined classpaths and library versions.
关于java - 安装外部 java 包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5864214/