Getting Started with the Java SDK
Rackspace's official SDK for Java is Apache jclouds, an open source multi-cloud toolkit for the Java platform that gives you the freedom to create applications that are portable across clouds while giving you full control to use cloud-specific features.
Currently, jclouds offers support for many Rackspace services:
- Auto Scale
- Cloud Block Storage
- Cloud DNS
- Cloud Databases
- Cloud Files
- Cloud Images
- Cloud Load Balancers
- Cloud Servers
Create a directory to try out jclouds
mkdir jclouds cd jclouds
Download this pom.xml file.
mvn dependency:copy-dependencies "-DoutputDirectory=./lib"
Tip: To make jclouds a part of your existing project, simply copy the relevant dependencies into your own pom.xml file.
You should now have a directory with the following structure:
Copy code from the Getting Started guides linked above into Java source files in the jclouds directory.
Compile the code
javac -classpath ".:lib/*" MyCloudExample.java
Run the code
java -classpath ".:lib/*" MyCloudExample