Reputation: 3137
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
Upvotes: 8
Views: 26255
Reputation: 28793
I assume that you have an Android library (downloaded a GitHub repository of the library) and found that it doesn't contain pom.xml
. If you have this file, see How to Create a jar file from github project.
Open a folder of the library and add local.properties
file with a path to your Android SDK (for instance, sdk.dir=D\:\\Android\\SDK
). Otherwise you can see an error: SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable
.
In command prompt (cmd.exe) run gradlew build
. If it will throw Android exceptions, maybe you should switch to master
branch of the library and build again.
If everything was normal see subfolders and look for build\libs
folders inside. There you can find jar
-files.
Upvotes: 1
Reputation: 2079
This is the easiest way, assuming you dowloaded the zip file containg the .java source files from github:
omegle-api-java-master
.omegle-api-java-master
. Eclipse will create a project from the source in your workspace, and set it up with a java builder.Properties
, going to Java Build Path
, selecting the Projects
tab, and clicking the Add
button.Export
-> Java
-> JAR file
, which will create your jar file for you.Upvotes: 9