Posts

Google Drive API Example - What worked for me

Image
An interesting Java example exists for the Google Drive API on the Google Developers Site . It is located in the Quick Start menu. It is intended to provide developers with a simple way to start using the Google Drive API. While this is a welcome extension provided by Google, I ran into problems making this example work. The first problem I encountered was enabling the Drive API. The instructions indicated that you are required to "enable the Drive API". I did this, but it appears you also need to enable the Drive SDK as well. If you fail to enable both you receive an "access not configured" error. The 2nd problem that caused me a few hours of frustration was the inability to build the example using the suggested Maven configuration. After numerous attempts I was able to settle on this Maven configuration which appeared to work. <dependency>       <groupId>com.google.apis</groupId>       <artifactId>goog...

Mounting a windows folder from a Linux Host

I use VMWare Player to run Linux VM's on a Windows Host Machine. I use the Linux VM's as a development environment. To mount a windows folder in my Linux VM I use this command. sudo mount -t vmhgfs .host:/ /home/user/shares This gives me a folder ( shares ) in my Linux host which points to the windows folders I have made available from the Host operating system ( in my case Windows 7 ).

Oracle - FIX JAVA !!!!

I have been a loyal Java Developer since 1995.... Thousands of lines of Java have flowed from my fingers. At times, my fingers just seem to "know" what next statement to write. I don't have to think about it. But, my patience has run out. Another Java Zero Day exploit has hit the "fan". Oracle, its time. Its time, to use your billions to fix Java. The future of Java is at stake and the clock is ticking....

Vaadin ThreadLocal

I use the Vaadin Thread Local pattern in my Vaadin applications as a means to move the Application object around the various components and to implement a authentication process. The structure of an application which uses this pattern is as follows: public class Vaadin Application extends Application implements HttpServletRequestListener {      private static ThreadLocal <Vaadin Application > instance = new ThreadLocal <Vaadin Application >() public Vaadin Application () {         instance . set ( this );     } @Override     public void onRequestStart ( HttpServletRequest request , HttpServletResponse response ) {         instance . set ( this );     }     @Override     public void onRequestEnd ( HttpServletRequest request , HttpServletResponse response ) {         instance . remove ();   ...

Auto Starting and Stopping Tomcat on Linux

Most of the time I install Apache Tomcat as a Tar file on Linux. This works well when I just want to manually start and stop Tomcat from the command line. However if you have installed Tomcat on a Amazon EC2 instance, then you its a good idea to automatically start and stop Tomcat on server starts and re-starts. So, the following steps worked for on Ubuntu 12.04. Create a start up and shutdown script for Tomcat sudo nano /etc/init.d/tomcat In the file you should enter the following commands ( except for the changes for your environment ) # Tomcat auto-start # # description: Auto-starts tomcat # processname: tomcat # pidfile: /var/run/tomcat.pid export JAVA_HOME=<this is the folder where you have Java installed> case $1 in start)         sh <this is where tomcat is installed>/startup.sh         ;; stop)         sh <this is where tomcat is ins...

HTML 5 Test

HTML 5 promises a major change to web development. But, does your browser support HTML 5.? Test it out - here .

First fun for season

Image
Wet......