I'm trying to add the Coinbase Exchange Java API to my eclipse project.
The zip API file has the following file folder setup
source/main/java/com/coinbase/excahnge/api
All the source files are in the API folder. The rest of the folders are empty.
At first I tried to import it as a project but got a error saying 'no project found'.
I did not see any options under import to import the source files into my project.
Any help would be great, could not find any documentation on Coinbase Exchange website on how to use their Java API.
The Eclipse Import function expects either Eclipse projects, or something that can be converted to Eclipse projects (like Maven .pom files etc.).
All you have is a zip file containing some .java files.
Just place these .java files in your project folder, under com/coinbase/exchange/api.
Related
I've written a piece of vanilla Java code to do a specific task. It contains a bunch of packages and resource files.
I want to import the vanilla Java project to Android to use some of its utilities.
I've tried to build my project to jar file, add it to the libs/ folder and import it. I've also tried to import it directly to the project dependencies. However, none of the above worked. The jar file showed up in the "External Library" part, but I cannot import it from a class inside as it gave me compilation error.
HERE you have plenty of ways how to attach jar to Android project
are you shure that your jar (assuming properly built) will work on Android? not all components and classes of "vanilla" Java are available on Googles OS... check out THIS topic for more info
this is the API i want to use: https://labs.micromata.de/projects/jak/quickstart.html
i tried to download and unzip the files (including JAXB) but i have no idea what to do with them. how do i add it to my project?
i searched for how to add API/library but all results told me to import the jar file. did not find any jar file. the unzip folder just looks like a regular project folder. i also tried to export that folder into a jar file, it did not solve the problem, tried to copy and paste the folder into my project, also did not help.
in the doc it says:
Download the Java API for KML JAR at GitHub and add the JAR to your
classpath.
If there are any dependencies, resolve them and add JAXB to
your classpath, too. Version 2.1.xx should be fine.
to add what JAR? i'm really confused
I deleted my project permanently and I want to import my old executing .jar into eclipse.
Eclipse import function does not find anything it the jar file.
Can someone give me a tip or recover the file?
Here is a screenshot of eclipse
Thank you
Click here for the file to recover
You cannot recover the project. You did not set to export source files while exporting, there are only .class files.
For future reference select Export Java source file and resources while exporting the project.
Reference: http://www.albany.edu/faculty/jmower/geog/gog692/ImportExportJARFiles.htm
I am curious to know if it's jar why do you want to import as a project?
You can import external jar as a "APP Client Jar File" which is under Java EE.
I tried this with your attached jar and I am able to import it and able to see the content in it.
You are mixing a few things. If you deleted your project source you won't be able to recover it unless you decompile it, and it will be obfuscated even though.
What you have is the compiled project, resulting from taking your source (.java) and compiling it to .class files.
The Import option in Eclipse is made for importing .project files, that hold your project's information. Also you could create a new project from your existing code but as far as I know you just can't create/recover a project from it's compiled jar.
I'm trying to add https://github.com/astuetz/PagerSlidingTabStrip to my project. Looking at it, I notice that it has files in res and depends on its own R.java file. When I make it a JAR I continue to get errors because the dependencies aren't all there. I'm not sure how to get this to work.
I keep getting errors like
import android.support cannot be resolved and everything else too. I tried referencing different answers on StackOverflow but none of them yielded a working solution.
The resources won't be packaged into the JAR file. Google is working on a new packaging scheme called AAR which is supported by Android Studio.
In order to use this third-party library in your own project, you should clone it to a local repo. Then you can import it directly into your Eclipse workspace and then add the Eclipse project to the classpath of your app's project.
Download the whole source code from https://github.com/astuetz/PagerSlidingTabStrip by git tool.
On your Eclipse IDE, import the library as exsisting source code at Android option.
Add the library your add before into your project.
I added twitter4j 3.0.3, into an Eclipse project but it does not import any classes from the jar. I copied in some code samples from the twitter4j jar files but eclipse can't find any of the classes in those files - e.g. Twitter, ConfigurationBuilder, TwitterFactory etc... I've added twitter4j-core-3.0.3-sources.jar to my build path. But Eclipse doesn't suggest to import any classes in these files. Is there anything I'm missing?
You need to add the twitter4j-core-3.0.3.jar JAR to your build path, it can be found under the lib directory of the download.
The twitter4j-core-3.0.3-sources.jar JAR only contains source code.