title: Java Google API oauth2 REDIRECT URI options
body: <p>I am writing a desktop app using the Java API for google. I can authenticate using oauth2 and a REDIRECT URI of : <code>urn:ietf:wg:oauth:2.0:oob</code> which will give the user a code to copy paste back into my application.</p>
  
  <p>I would rather have a better workflow than that though, and replace the REDIRECT URI with <code>http://localhost:8080/myreceiver</code> - or something similar which I believe is valid.</p>
  
  <p>My question is - what is the best way to easily bring up a Java based webserver at an address like that allowing me to automatically receive this code and continue oauth2 authentication?  Does part of the google api give anything to help here? Or should I be looking at a standard Java based web server like <a href="http://tjws.sourceforge.net/" rel="nofollow">http://tjws.sourceforge.net/</a> or otherwise?</p>
  
  <p>Any opinions would help me out a lot!</p>