Importing YouTube API Java samples into Eclipse IDE

Importing YouTube API Java samples into Eclipse IDE


In this segment, we’ll be
walking through the steps it takes to set up Eclipse
to run the YouTube API samples for Java. For this example, I’ll be using
Eclipse 4.3, also known as Eclipse Kepler. You’ll need to already have
downloaded the YouTube API samples from the Project page
and have unzipped the files, as well as have registered
an API key. If you’re unsure about how
to do these steps, please reference our other videos. Versions of Eclipse greater
than Eclipse 4.2, Eclipse Juno, should have Maven
integration out of the box. If you’re using an older version
of Eclipse, you’ll want to install the m2eclipse
plug-in via Eclipse’s Help– Install New Software
Mechanism. We won’t be going through the
installation process for older versions of Eclipse in this
video, but there are many resources online that will
teach you how to do this. The way we import the samples
is through File, Import. We’ll want to search
for the word Maven. If we’re running a version
of Eclipse that correctly integrates to Maven, we should
see Existing Maven Projects. Click Next. If you don’t see this,
either upgrade your ID or install m2eclipse. Let’s click Next. The way we import the samples
is we go to Browse. Now let’s browse to the
directory of a sample. Click into it, and click Open. Eclipse will now analyze the
palm.xml file to find all relevant name projects. When this is done, you’ll see
the project appear in a projects list. You should see the name of the
project you’ve imported right after palm.xml. Let’s click Finish. Eclipse will go ahead and now
download the dependencies in the background. You’d expand the progress
tab to see the libraries being download. What Maven is doing is
connected to remote repositories, and downloading
the dependencies that are required to run the
sample code. When this process is completed,
you should see all the libraries for the sample
code under Maven Dependencies. We should now be able
to run the project.

Leave a Reply

Your email address will not be published. Required fields are marked *