[英]How do I use another java project in my code?
I am currently using the Eclipse IDE and want to import an external java project so that I can use it in something I am working on.我目前正在使用 Eclipse IDE 并想导入一个外部 java 项目,以便我可以在我正在处理的事情中使用它。 I downloaded the directory of icePDF, found here , and would like to use the java class file " SwingViewBuilder.java " that is found in the directory I linked at "/icepdf/branches/icepdf-6.2.5/icepdf/viewer/src/org/icepdf/ri/common".
我下载了在 这里找到的 icePDF 目录,并想使用在我链接的目录中的 java 类文件“ SwingViewBuilder.java ”“/icepdf/branches/icepdf-6.2.5/icepdf/viewer/src /org/icepdf/ri/common”。 I have tried some basic things like importing the folder itself, but it did not work.
我尝试了一些基本的东西,比如导入文件夹本身,但它没有用。
I would highly suggest using a dependency management tool like Maven or Gradle to download this dependency and any other dependencies you may have into your project for you.我强烈建议使用像 Maven 或 Gradle 这样的依赖管理工具来为你下载这个依赖和你可能拥有的任何其他依赖到你的项目中。
Here is the maven getting started guide: https://maven.apache.org/guides/getting-started/这是 maven 入门指南: https : //maven.apache.org/guides/getting-started/
And here is the maven dependency for you to add to your pom.xml file: https://mvnrepository.com/artifact/org.icepdf.os/icepdf-viewer/6.2.2这是您添加到 pom.xml 文件的 maven 依赖项: https : //mvnrepository.com/artifact/org.icepdf.os/icepdf-viewer/6.2.2
If you specifically need version 6.2.5, you will need to build the icePDF project yourself and configure your class path to use it as a dependency.如果您特别需要 6.2.5 版本,则需要自己构建 icePDF 项目并配置您的类路径以将其用作依赖项。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.