Lab Tutorial: Distributed Systems Course Spring 2015
Lab Tutorial: Distributed Systems Course Spring 2015
Lab Tutorial
Authors: Jordi Blasco Planesas & Montserrat Rovira Marco
Distributed Systems course
Spring 2015
1.
OVERVIEW.........................................................................................................................2
2.
2.1.
3.
JAVA .....................................................................................................................................5
3.1.
Installation ................................................................................................................................ 5
3.2.
Setup ......................................................................................................................................... 5
4.
4.1.
ECLIPSE ..............................................................................................................................6
Installation ................................................................................................................................ 6
4.2.
Setup ......................................................................................................................................... 6
4.2.1.
Testing environment: ............................................................................................................. 8
4.2.2.
Import and run SD project ...................................................................................................... 9
Distributed Systems
Page 1 of 10
Lab Tutorial
1. Overview
The purpose of this manual is to explain how to prepare the environment to do the practice of
Distributed Systems.
The manual is divided into the following sections:
Virtual machine: this section explains how to install the virtualization software, and how
to create our virtual machine with GNU / Linux.
This section is important if you use Windows OS; if you use GNU/Linux or OS X, you
can ignore this section.
Eclipse: this section explains how to install and configure Eclipse IDE. Moreover, you
can learn how to create a new project and how to do a test. Also shows how to import
Distributed Systems
Page 2 of 10
Lab Tutorial
2.1.
Install VirtualBox
Download the appropriate package for your operating system:
https://www.virtualbox.org/wiki/Downloads
Run VirtualBox:
Select Machine New ... Put a name and select an OS Select RAM Memory
allocated to this virtual machine Select Create a virtual hard drive now VDI
Dynamically allocated Select the maximum disk size Create
Select Settings ... Storage Controller: IDE Add CD/DVD Device icon choose
disk select ubuntu .iso file Open OK
Figure 1
Distributed Systems
Page 3 of 10
Lab Tutorial
Figure 2
Start the virtual machine and Install the operating Ubuntu to the virtual machine.
After this process is completed you will have available GNU/Linux OS.
Distributed Systems
Page 4 of 10
Lab Tutorial
3. Java
For developing and deploying java applications install Java Standard Edition Development Kit
(JDK) on your computer. You will need JDK7 or upper in order to do the practice
There is another product available, Java Standard Edition Runtime Edition (JRE), but only
include utilities for running java programs, not for compiling source code.
3.1.
Installation
GNU/Linux:
3.2.
Ubuntu: https://help.ubuntu.com/community/Java#Oracle_Java_7
OS X: https://www.java.com/en/download/help/mac_install.xml
Setup
If you try to run java code from Command Line Interface (CLI), you will need to set PATH. This
environment variable allows you to run java utilities from any folder.
To set environment variable PATH:
http://docs.oracle.com/javase/tutorial/essential/environment/paths.html
Distributed Systems
Page 5 of 10
Lab Tutorial
4. Eclipse
An integrated development environment (IDE) or interactive development environment is a
software application that provides comprehensive facilities to computer programmers for
software development. An IDE normally consists of a source code editor, build automation tools
and a debugger. There are several Java IDE available and eclipse is the one we use.
The practice can be done with any other IDE, but from Distributed Sytems laboratory only will
support Eclipse.
4.1.
Installation
Install Eclipse:
run eclipse.
4.2.
Setup
1. Run eclipse and choose a folder to be the workspace. Eclipse will store your Java
Projects into this folder
Figure 3
Distributed Systems
Page 6 of 10
Lab Tutorial
Figure 4
Distributed Systems
Page 7 of 10
Lab Tutorial
Figure 5
Distributed Systems
Page 8 of 10
Lab Tutorial
Figure 6
Local evaluation
When you have implemented Log and TimestampVector classes, you can test in a diferent
ways:
From Eclipse:
Run Run Configuration create run configuration Arguments tab:
Program arguments:
<port> <uoc-username> -h sd.uoc.edu
Working directory :
${workspace_loc:2015p-practica-SDsolucio/scripts}
Apply Run
Distributed Systems
Page 9 of 10
Lab Tutorial
Formal evaluation
From Eclipse:
Run Run Configuration create run configuration Arguments tab:
Program arguments:
<port> <uoc-username> -h sd.uoc.edu
Working directory :
${workspace_loc:2015p-practica-SDsolucio/scripts}
Apply Run
Distributed Systems
Page 10 of 10