简体   繁体   English

Java项目中的JAR文件

[英]JAR files in a Java Project

I did the following to add jar files to my Java project: https://stackoverflow.com/a/325545/2653179 我做了以下操作,将jar文件添加到Java项目中: https : //stackoverflow.com/a/325545/2653179

It worked, but what do I do if I want to send my project to another computer? 它可以正常工作,但是如果要将项目发送到另一台计算机该怎么办? The project on another computer doesn't recognize the import when doing so. 这样做时,另一台计算机上的项目无法识别import

You should send the JAR files too, so that they can recreate the project on the other computer. 您也应该发送JAR文件,以便它们可以在另一台计算机上重新创建项目。

Usually the source files and the JARs are placed in some version control system and the people pull/get the JARs from there so they can recreate the project on the other/local computers. 通常,源文件和JAR放置在某个版本控制系统中,人们可以从那里获取/获取JAR,以便他们可以在其他/本地计算机上重新创建项目。

Make sure the project does not contain any paths which are specific to the computer it was created on (like absolute paths). 确保项目不包含任何特定于其创建计算机的路径(例如绝对路径)。 This will make its moving to another computer much easier. 这将使其更容易转移到另一台计算机。

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM