I am at my wit's end and this should not be so difficult. Youtube v2 APIs are deprecated rendering my application useless. So, based on this website (https://developers.google.com/youtube/v3/code_samples/java#search_by_keyword), I am trying to run the sample. I downloaded google v3 client libraries from this location (https://code.google.com/p/google-api-java-client/). Now in the code sample there are multiple imports for com.google.api.services.*. But this jar is not included in the client libraries and I have spent more than 2 hours to figure out where to get this jar. I am going around circular references not finding anything. Is there some obvious stuff that I am missing. I am not familiar with maven, so if it is straightforward maven stuff, please just point me to the google site where I can download latest jar.
Thanks in advance.
I found it at http://mirrors.ibiblio.org/maven2/com/google/apis/google-api-services-youtube/v3-rev136-1.20.0/.
Though it solved my problem for now, can someone explain me the rationale behind having jars in such hidden locations. I am not full time into jave for the past few years, so I am not sure if I missed anything.
Go to this maven central repository link.
You can either download the jar directly or get maven/gradle dependency.
You can get all the google libraries in the maven central repository's google group
Note: Always use a build system, it will make your job easy. You don't need to manually download the file, extract to the right folder blah,blah,blah... Just include the dependency in the maven/gradle file and it will take care of the rest
Related
I am an enthusiast attempting to play around and add things to an app that I have been using for the past year which the source codes are available in GitHub. Problem is when I clone or download the repository and open it in Eclipse, I get a ton of error codes whenever I try to 'run as' Java app (in particular I am unable to find the 'main class/starting point' there's way too many files to chose from to find it and most don't work) and when I try to extract the files to an executable jar it gives me a JAR exe that is unusable :-(. I know that the files are workable since I do use the executable jar that is available from the developer and others have also toyed around with the source codes.
Can anyone assist me with this? Maybe I am using the wrong Java manipulator/application. The program I am using for opening these files is Eclipse IDE for Java Developers and my operating system is 64bit Windows 10.
Also, here is the GitHub URL for the repository, in case anyone asks: https://github.com/DraqueT/PolyGlot.
I thank anyone who can be of some assistance as I have been working on this forever and can't seem to find a solution.
The github project looks a lot like a utility library than a full application. But the following could help:
Try to study the README file attached to the github project. (There is one in the source code according to the author). This would help you to setup the project.
Make sure to download all the dependencies for that project. Again, the author has provided some of them in the github project (I could see some Apache POI libraries in there somewhere), but getting the required jars on the maven repository isn't that difficult.
It would also help to know what type of project it is. For example, having a main method in a web application doesn't do much for you, but a Java SE project would need a main method to run. So try to find out what kind of project it is.
If all else fails, you could try to contact the owner of the repository or one of its contributors to assist you.
Cheers!
In my JAVA application, i am using Xuggler for ScreenCapture and other functionality. Now its a maven project so i put Xuggler as dependency in Pom.xml as told in this Link.
Now few days ago i cleaned my system, so when i again imported my project, now it is showing "Missing artifact xuggle:xuggle-xuggler:jar:5.4". Though in pom file, repository link is there. I explored more and found out that http://xuggle.googlecode.com/svn/trunk/repo/share/java/xuggle/xuggle-xuggler/5.4/xuggle-xuggler-5.4.jar is showing 404 error(Not Found).
Now my whole JAVA Application requires Xuggler, so can anyone please share me current working link from where i can download "xuggle-xuggler-5.4.jar" or any other method(s) so that in future i don't face such problem again.
Thank You.
from http://www.xuggle.com/downloads
change the url:
<url>https://files.liferay.com/mirrors/xuggle.googlecode.com/svn/trunk/repo/share/java/</url>
It doesn't seem anyone is maintaining Xuggler any more: the last blog post says "Xuggler development is on hiatus. Probably permanently."
If you are good with Maven and suchlike you might be able to build Xuggler yourself. The source code is available from the Google Code archive.
I'm relatively new to android but learning fast.
One thing that boggled me is, when adding an API, let's say the Youtube API to android studio, is how to also add its documentation to be available when clicking CTRL+Q.
I downloaded the compressed folder which contains a JAR for the API, and a folder for documentation which includes an "index.html" among others.
I copied the JAR to the libs and it worked correctly and I tested the sample apps.
But there is no documentation on any class/method/etc...
I tried to copy the "doc" folder itself to the libs folder, I tried to zip it and convert it to a JAR file in the libs then add it as a dependency, Synced with Gradle, Rebuild project, but no change.
What am I missing? What is the correct way to implement the documentation in Android Studio of downloaded APIs?
Thanks for the help. I've wasted too many hours searching online...
EDIT:
This is a screenshot of the project structure with the API added as a dependency to the "app" module.
The docs are not in that JAR file, but google provided them seperately as HTML, which i have compressed into a JAR file. (not sure if this step is useful)
This is how the doc jar looks like inside:
I'm expecting it to work when I CTRL+Q on any class from the youtube API, so far nothing worked.
For anyone who found this post, the solution is manual AND has to be done after each gradle sync, check this link
(except i disagree on the fact that it's only web-based javadoc, it worked local for me with html-based javadoc not jar, condition is to have it end with /reference/ as in c:/javadoc/docs/reference/ otherwise android studio won't find the javadoc)
It's not a perfect method, not all info will be shown but better than nothing.
I am new to enterprise application developement and trying to create a REST server with Spring REST, JPA taking to mySQL database and Javascript on the client side. As I see loads of opensource libraries doing specific task, I started off with using 'maven project' with different 'arch type' (which is nothing but predefined POM with relevent libraries as I understand) provided by Eclipse. But I often run into version mismatch issues, in many cases found specific solution to that perticular libraries in StackOverflow or other sites.
Hence I started looking for a information these version dependancies such as, this version of JPA works with that version of Hibernate library and so on. I checked maven repository of major libraries, I did not find such information so far.
My queries are:
Where can I find these information about the versions dependancies?
Are these pre defined POM in eclipse reliable? Who owns them, where can I get last modified dates on these maven 'arch types'? (I find the ones I choose having fairly old version of libraries).
If I have to start off on my own creating a Maven dependacies, where will I get information about what are the dependent libraries, for example, if I need spring MVC, for sure it needs java servlet library. I am worried becuase the maven 'spring-mvc-jap' arch type whooping 50 libaries as dependancies.(Coming from embeded domain, I find to too hard to digest :D). So not sure if it is the right way.
Please correct if I am missing anything in my understanding.
You can find this information, if you are using maven and some IDE you can go to the dependancy and make click un > and this will show the librarys used for this dependancy or if you want to use the console you have http://maven.apache.org/plugins/maven-dependency-plugin/examples/resolving-conflicts-using-the-dependency-tree.html this will show the same that the IDE.
After normally in the documentation of the library used, you can find some doc about the dependancy about this.
Other solution is get the .jar and use 7zip to see the POM and know the dependancy used.
And for finish my answer if the IDE tell you that you dont have x dependancy normally you have to add this because any of the other dependancy used have it (they used only for the compiling task), but sometime somes projet change a lots of code between the version .a to .b so you will have some problem using the version .b, at this moment i didnt find one good and easy way to fix this, only using the way that i told you (only if i found some problem in the compilation)
3> I am not sure how it works in eclipse but in IntelliJ IDEA when you start using some class without proper dependency IDEA suggest you to add proper dependency automatically. The same approach should be in eclipse.
As not all our development machines have internet access, we want to cache the API docs of various libraries in our local network. I was thinking of a webapp that handles caching and listing the available Javadocs after someone uploads them (in jar format). Ideally, the source jars would be automatically pulled from our maven repository (artifactory).
I have not been successful in finding anything like this on google, so I'm trying my luck here.
EDIT
I have found a site that does exactly what I am looking for: http://www.jarvana.com The problem is that this site does not fulfill my #1 requirement - offline availability. So I rephrase my question to: Is there a webapp that works like jarvana but that can be deployed to a local server?
It seems like what I'm looking for really doesn't exist, so I've rolled my own really simple webapp that serves JavaDocs from a local maven repository (transparently extracting jar files). It's far from perfect, but it works for my requirements. If anyone is interested, I shared it on github:
https://github.com/planbnet/JavaDoc-Browser
Why not just use mvn site?
Hm, I'd better add something more useful than that :-)
mvn site will build and deploy a bunch of site reports including the javadoc (assuming you configure that plugin). Everytime your CI server builds the code from trunk/branch/tag/whereever, the latest Javadocs will be generated and stored on the file system (accessible via HTTP)!
There's even a cool report that ties the javadoc into the source code.
You can give wwwoffle a try. A caching proxy which enables to access sites while you're offline.
I wrote a python script some time ago to serve the javadoc from my local maven repo:
http://blog.robotninjas.org/2013/04/17/accessing-your-cached-javadoc-offline/
python javadoc.py
It's crude, but hitting http://localhost:8080/m2 will list all of the projects in your local maven repository with downloaded docs.
You can download all the javadoc jars for a maven project with:
mvn dependency:resolve -Dclassifier=javadoc