Adding Java to the Development Environment

Now we have LAMP and Python installed its time to start adding some more of the programming languages we are going to use, first step is Java because it opens up a range of additional languages such as Groovy, Scala, Closure along with Java versions of Python ( JPython ) and Ruby ( JRuby )

The version of Java we will use is Open JDK. There are 2 components to install Java, the Java Runtime Environment ( JRE ), which is used by Java based applications that we will install later such as Tomcat; and the Java Development Kit ( JDK ) which contains the programming environment, libraries and compilers necessary to write, compile, debug and execute Java code.

sudo apt-get install openjdk-7-jre
sudo apt-get install openjdk-7-jdk

You can check its all installed by checking the version

java -version

should return the following

java version "1.7.0_07"
OpenJDK Runtime Environment (IcedTea7 2.3.2) (7u7-2.3.2a-1+rpi1)
OpenJDK Zero VM (build 22.0-b10, mixed mode)

Once we have Java installed we will then add Tomcat, an open source software implementation of the Java Servlet and JavaServer Pages technologies

sudo apt-get install tomcat6
sudo apt-get install tomcat6-docs
sudo apt-get install tomcat6-examples
sudo apt-get install tomcat6-admin

Tomcat starts on port 8080 so to make sure its working point a browser to http://:8080 and you should see something similar to the following

Your email address will not be published. Required fields are marked *