Walkthrough: How I Got the Amazon Java Code to Compile/Work

Step: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | N

I downloaded the Amazon Web Services Developer's Kit to learn about web services and how I might implement a Java-based Servlet against the Amazon Web Services (AWS). I opened the SDK's READMEFIRST.txt file and read the instructions for the Java sample application:

Instructions on how to use the Java Sample

1) Requires JDK 1.4.0 and Apache Axis. 
2) Unpackage included files to a directory 
3) Update your CLASSPATH to include an explicit reference to each Axis JAR file
4) Download newest WSDL, and place in the same directory 
5) Run client.axis.sh to generate client stubs 
6) javac *.java 
7) java run 

My first thought: "Wow! These are pretty terse instructions!" After a few evenings of fumbling and stumbling, I got the sample application to work. I created this web page to describe how I did it. I won't be describing the code itself, which relies heavily on code generated by Axis. Instead, I wanted to "walk through" my adventure compiling and running Amazon's sample Java application.

Note: I did all of this using a PC running Windows 98. Instead of DOS, I used Cygwin as my "development" environment. Cygwin provides a UNIX "shell", which I prefer to DOS. The walkthrough is PC-centric, but since this is Java, the same principles should apply even if you're using a Macintosh. Sorry about that.

Amazon's sample Java application looks like this:

Figure 1: The demo application.

Next
Step: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | N



Rick (rgu@TheWorld.com) Umali
Original: 2/24/2004 Last Update: 3/15/2005