0

I'm working on a project that involves pulling data from Google Analytics. I'm familiar with Java and Netbeans, but this is my first time working with Google APIs. I have several remedial questions, which should be straightforward for those with more experience.

1) It looks like I have to use Java EE because Java SE does not include all the servlet classes. Is that right?

2) Using Java EE and Netbeans 7.3.1 I have the option of setting up different kinds of projects: "Java", "Java Web", and "Java EE", among others. I assume I have to use "Java EE" to include the appropriate packages. Is that right? (I ask because I'm slightly more familiar with Java SE projects and because I know OAuth requires some browser interaction, so thought I might have to use "Web".)

3) What other packages do I have to have? Obviously I need the Google Analytics API client package. Do I also need an "Oauth2" package or similar?

4) What is the function of scribe`? (https://github.com/fernandezpablo85/scribe-java) Is it recommended? Would I use that as an alternative to Google's sample authorization code?

UPDATE:

5) What do I need to know about running a Google Analytics API application via Netbeans vs. in the command line?

Many thanks to everyone for the help.

ACPrice
  • 667
  • 2
  • 10
  • 25

1 Answers1

1

I ended up figuring out most of this stuff, so thought I'd answer my own question for everyone's benefit (hopefully!)

1) No, you can use Java SE. You can get the requisite servlet packages as jars and add them to your project.

2) No. Again, you can include the jars you need piecemeal, as long as they are all compatible with each other.

3) Working in Java 1.6.0_45, Netbeans 7.3.1. I added the current Google Analytics API package, the current OAuth2 package, and a few jars from Jetty 6 (which appears to be a little out of date, but worked).

4) Pass. Didn't end up using it.

5) Pass. Don't really know. Appears not to be much of a difference.

ACPrice
  • 667
  • 2
  • 10
  • 25