从GitHub项目中导出可用的.jar文件 [英] Exporting usable .jar files from GitHub project
问题描述
我对java和eclipse相当陌生,我想从这个github项目中获取jar文件:
https://github.com/nikkiii/omegle-api-java
我已经在Eclipse中尝试这样做,但我不能导入项目作为一个Java项目,(我认为)因为这个原因,我不能使用导出功能获取该项目的jar文件。这个最简单/最好的方法是什么?
感谢
这是最简单的方法, zip文件包含来自github的.java源文件:
- 将zip文件解压缩到Eclipse工作区中的文件夹中,比如<$ c在Eclipse中,选择New-> Java Project并将其命名为
omegle-api -java主
。 Eclipse将在工作区中从源代码创建一个项目,并使用一个Java构建器进行设置。 - 导入所有需要的jar来编译它(例如,项目页面声明您需要 https://github.com/douglascrockford/JSON-java )。你可以用同样的方法在工作区中提取它,然后通过右键单击Omegle项目,选择
Properties
,将它导入到你的Omegle项目中,转到Java Build Path
,选择项目
选项卡,然后单击添加
按钮。 / li>
- 一旦编译完成,右键单击Omegle项目,选择
导出
- >Java
- >JAR文件
,它会为您创建您的jar文件。
I'm rather new to java and eclipse, and I would like to get jar files from this github project:
https://github.com/nikkiii/omegle-api-java
I've tried doing so in eclipse, but I can't import the project as a java project, and (I think) for this reason I am not able to use the Export feature to obtain jar files for the project. What is the easiest/best way to go about this?
Thanks
This is the easiest way, assuming you dowloaded the zip file containg the .java source files from github:
- Unzip the zip file into a folder in your Eclipse workspace, say
omegle-api-java-master
. - In Eclipse, select New->Java Project and name it
omegle-api-java-master
. Eclipse will create a project from the source in your workspace, and set it up with a java builder. - Import any required jars to get it to compile (for example the project page states you need https://github.com/douglascrockford/JSON-java). You can extract that in your workspace in the same way and then import it into your Omegle project by right clicking on the Omegle project, selecting
Properties
, going toJava Build Path
, selecting theProjects
tab, and clicking theAdd
button. - Once everything is compiling, right click on the Omegle project, select
Export
->Java
->JAR file
, which will create your jar file for you.
这篇关于从GitHub项目中导出可用的.jar文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!