简体   繁体   English

如何将包含所有引用库的 java 项目发送给朋友,以便他们可以运行它并在其 Eclipse 中编辑源代码?

[英]How can I send a java project including all referenced libraries to a friend so that they can run it and edit the source in their Eclipse?

I am trying to send a project that uses Selenium libraries to a friend so they can run it and edit the source code in their Eclipse IDE. From what I understand, they won't be able to edit the source if I send them a JAR file, and if I send them an archive file they'd need to import the referenced libraries themselves.我正在尝试将使用 Selenium 库的项目发送给朋友,以便他们可以运行它并在他们的 Eclipse IDE 中编辑源代码。据我了解,如果我向他们发送 JAR,他们将无法编辑源代码文件,如果我向他们发送存档文件,他们需要自己导入引用的库。 Is there a workaround?有解决方法吗?

You should define all your dependencies (libraries, etc.) with tools such as maven or gradle.您应该使用 maven 或 gradle 等工具定义所有依赖项(库等)。

While project sharing should be performed via a VCS tool like git to keep track and merge the changes both of you will make and a remote repository on GitHub or similar platforms to share and store the project.虽然项目共享应该通过像 git 这样的 VCS 工具来执行,以跟踪和合并你们所做的更改,并通过 GitHub 或类似平台上的远程存储库来共享和存储项目。

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

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