Friday, 3 July 2015

GET START WITH CLOUDSIM ON NETBEANS

CloudSim is a tool (library) for cloud computing simulation written in Java language.  Therefore, you must have a basic knowledge of Java programming. CloudSim installation is not needed because it is a library so you just unpack the package and then add .jar file as a library into your project. It can work with any programming IDEs that support Java like Netbeans or Eclipse.
And now I’m going to show you how to use CloudSim on Netbeans.
If you don’t have Netbeans, go to download here and install it. Also CloudSim you can download from this site with the latest version (3.0.2 now). Unpack it into a place you want.
When the preparation is done. Let’s begin with CloudSim :)
Firstly, open Netbeans then add a new project (File -> New Project…)
Create project as a Java Application.
 Name your project and choose a file path. Uncheck “Create Main Class” box. Then press “Finish” button.
Now we are going to add CloudSim library into our project.
Right Click on the project and click on “Properties”. A project properties dialog will appear. Select “Libraries” and press “Add JAR/Folder” button.
Go to the folder that CloudSim is unpacked. You can find its library at “jars” folder. Then select file “cloudsim-3.0.2.jar” and add it into your project’s libraries.
CloudSim is ready to use now. We will start with its examples by copying “org” folder in “examples” to your project (just drag & drop it over Source Packages).
Expand “org.cloudbus.cloudsim.examples” and right click on “CloudSimExample1.java” then select run. The result of its output will look like this.

Now you can make your own cloud computing simulation by modify these examples.

No comments:

Post a Comment