Jboss Admin Tutorial: Installing JBoss AS

3. Installing JBoss AS

3.1. Getting and Installing Java

  • Download Java SE 6 JDK from http://java.sun.com/javase/downloads/index.jsp or http://java.sun.com/products/archive/ (for Java SE 5 JDK)
  • On UNIX run the installer or uncompress the distribution into a directory of your choice
  • On Windows, run the installer

    • Avoid installing Java into a directory that contains spaces or other special characters (e.g. under C:\Program Files)
    • You can choose not to install "Public JRE", demos, and source components

While the "Public JRE" on Windows is not required by JBoss itself, having it installed will make it possible for your browsers to load the navigation applet which is part of JBoss' /web-console/ application.

3.2. Configuring Java

  • Set JAVA_HOME to point to the directory where you installed Java and add $JAVA_HOME/bin to your PATH

    • On Windows, add JAVA_HOME System Variable under Start -> Settings -> Control Panel -> System -> Advanced -> Environmental Variables and prefix the existing Path variable with %JAVA_HOME%\bin;. Re-open any existing "Command Prompt" windows for this change to take effect.
    • On UNIX-like systems, make these changes in your shell’s configuration file (e.g. ~/.bashrc): export JAVA_HOME=/path/to/java-install-dir and export PATH=$JAVA_HOME/bin:$PATH
  • Test that java -version prints the expected Java version
  • Test that javac prints usage message
  • This verifies that JDK is installed (vs. JRE)

3.3. Getting JBoss AS


You can either download jboss-<version>.zip or jboss-<version>-jdk6.zip depending on the version of Java you installed. Generally, Java 6 is preferred as it is faster, offers better management features, and it is backwards compatible with Java 5.

How to build from source ?

  1. Get Ant from http://ant.apache.org/
  2. Uncompress it in a directory like C:\Ant
  3. Set ANT_HOME to point to the directory where you installed Ant
  4. Add $ANT_HOME/bin (on Linux), %ANT_HOME%\bin (on Windows) to your PATH
  5. get jboss-<release>-src.tar.gz from http://www.jboss.org/jbossas/downloads
  6. unzip it
  7. browse to build directory and run ant
  8. Once finished the binaries will be under jboss-<release>.GA-src\build\output\jboss-<release>.GA

3.4. Installing JBoss AS 5

  • Unpack the compressed archive

    • This is the typical installation method because it is the easiest
  • Alternatively, install the source-built binary

    • Not a common installation method
  • Set JBOSS_HOME to the root folder of JBoss.
  • You can also add $JBOSS_HOME/bin (Linux) or %JBOSS_HOME%\bin (Windows) to your PATH in case you want to run your server from the command-line

You will still have to secure JBoss services, before deploying it in production. More on this later.


Even though this is supported, avoid installing/unpacking JBoss AS into a directory path that contains spaces or any other special characters. There is no requirement for for the installation directory to be owned by "root" (or any other privileged user). JBoss AS does not require super-user privileges, since none of the default ports are within the 0-1023 port range, which is considered privileged on many Unix-like systems.