Setting Up a Linux Based Tomcat Server (for Java Applications)

Watch out! This tutorial is over 2 years old. Please keep this in mind as some code snippets provided may no longer work or need modification to work on current systems.

Apache Tomcat is a web server and servlet container that is used to serve Java applications. Tomcat is an open source implementation of the Java Servlet and JavaServer Pages technologies, released by the Apache Software Foundation. This tutorial covers the basic installation and some configuration of Tomcat  on your Linux server.

Continue reading

Introduction to Java

Watch out! This tutorial is over 2 years old. Please keep this in mind as some code snippets provided may no longer work or need modification to work on current systems.

JAVA was developed by Sun Microsystems Inc in 1991, later acquired by Oracle Corporation. It was conceived by James Gosling and Patrick Naughton. It is a simple programming language.  Writing, compiling and debugging a program is easy in java.  It helps to create modular programs and reusable code and is ‘platform independent’.

Continue reading

Hello World in Java

Watch out! This tutorial is over 2 years old. Please keep this in mind as some code snippets provided may no longer work or need modification to work on current systems.

This is how you would display “Hello World” in your Java application.

We break the process of programming in Java into three steps:

  • Create the program by typing it into a text editor and saving it to a file named, say, HelloWorld.java.
  • Compile it by typing “javac HelloWorld.java” in the terminal window.
  • Execute (or run) it by typing “java HelloWorld” in the terminal window.

So, the code in our file would look like

To compile HelloWorld.java type the text below at the terminal

Once you compile your program, you can execute it. This is the exciting part, where the computer follows your instructions. To run the HelloWorld program, type the following in the terminal window:

That’s it!