How to Setup Java & Jetty on Linux Servers

Written by jonah quant
  • Share
  • Tweet
  • Share
  • Email

Users download Linux software applications as "package files" created by application developers. A package file contains all data and code files needed by the application in question, plus the scripts that install, set up, and uninstall it. To download and install package files users execute special administrative commands. You can install and set up the Java development environment and Jetty (a web server written entirely in Java) on your Linux server.

Skill level:


  1. 1

    Log in to the computer as user "root." Launch a command shell, either by logging in text mode or by launching a Terminal window from the graphical desktop.

  2. 2

    Download and install the Java development environment and Jetty. The specific commands required for this depend on the Linux distribution running on your server. For example, for Ubuntu Linux type the following command into the shell:

    apt-get install openjdk-6-jre openjdk-6-jdk jetty

    Press "Enter." Ubuntu will download all three packages (Java runtime, Java development environment, and Jetty) plus any other packages required by them but not yet installed on your system. The "apt-get" command will then execute the installation and initialisation scripts for all downloaded packages, in the right sequence to preserve inter-package dependencies.

  3. 3

    Open existing file "/etc./environment" with a text editor. Add the following:


    at the end of the value assigned to variable PATH on the line that begins with "PATH=". Save the file and exit the text editor.

  4. 4

    Type the following commands into the shell:

    cd /etc./rc2.d

    ln -s /etc/init.d/

    Press "Enter" at the end of each line.

  5. 5

    Reboot the computer. When your server finishes booting Jetty will be running--and it will always be started automatically during the Linux boot process.

Don't Miss

  • All types
  • Articles
  • Slideshows
  • Videos
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the site, you consent to the use of cookies. For more information, please see our Cookie policy.