I use the Amazon Linux AMI on all my EC2 instances and they come with OpenJDK IcedTea pre installed on them. I have had few issues with OpenJDK when running some applications and I always install the Sun/Oracle JDK 6 on them. Below are the few easy steps / commands to download and install JDK 6 once you log in to the EC2 instance using an SSH client.
Update:
Oracle doesn't provide direct download URLs for JDKs anymore. I have updated the steps with the trick mentioned here to get the installation file with wget
Run java -version to make sure you have the Sun/Oracle JDK as your default jvm now.
Showing posts with label AWS. Show all posts
Showing posts with label AWS. Show all posts
Thursday, January 26, 2012
Few Easy Steps to Install Sun/Oracle JDK on EC2 Linux
Don' forget to click the +1 button below if this post was helpful.
Friday, November 11, 2011
Reading All Items from an Amazon SimpleDB Query Result
As you may have noticed select queries in SimpleDB have a maximum limit to the number of results returned and you will have to use the nextToken mechanism to get all results from a query. A solution was posted on aws forum but since I have modified it a bit, thought I will post it here again.
The variable sdb is the AmazonSimpleDB implementation class which in my case is the AmazonSimpleDBClient initialized and injected using Spring. Following is the relevant Spring configuration section (I am initializing an AmazonS3Client too which is not required if you are only using SimpleDB).
AWS ID and Secret values are read from the aws.properties file in the classpath, which looks like below.
The variable sdb is the AmazonSimpleDB implementation class which in my case is the AmazonSimpleDBClient initialized and injected using Spring. Following is the relevant Spring configuration section (I am initializing an AmazonS3Client too which is not required if you are only using SimpleDB).
AWS ID and Secret values are read from the aws.properties file in the classpath, which looks like below.
Don' forget to click the +1 button below if this post was helpful.
Subscribe to:
Posts (Atom)