Each WSO2 product is a Java application. Therefore, in order to install them, it is necessary to install Java Development Kit first and then set the environment variables.
Follow the instructions below to install Java Development Kit on Linux using the command line.
Establish a SSH connection to the Linux machine or log to the text Linux console. You should either log in as root or obtain root permissions after login via
In order to check if Java Development Kit is installed on the computer, do the following.
1. Execute the following command:
The system displays information on the currently installed Java applications.
In case the needed JDK version is not installed on the computer, proceed to Step 2 to install it.
1. Execute the following command to add the repository:
2. Execute the following commands to update the repository and install JDK:
3. The operation log will be displayed. The system automatically downloads necessary files from the web for installation. The system asks to confirm the installation process continuation. Type "Y", and press "Enter."
4. After the installation process is complete,
jre are installed to
/usr/lib/jvm/<java> directory, where <java> is the actual java installation folder. For example,
1. Download sun-JDK from the official Oracle site. Open a Web browser and access the following URL:
While selecting a packet to upload, choose the RPM.
2. Start the remote SSH session in the GUI terminal window (Konsole in KDE, Gnome Terminal in Gnome, etc.) or open the Linux text console.
3. Install the downloaded version of JDK.
4. Execute the following command to add installed JDK to alternatives:
5. Choose which version of JDK to use:
For example, to use the
sun-jdk, choose "3" and press "Enter."
6. Check the installed and configured JDK by typing following command:
The output will show you the version of the JDK installed in your system.
JAVA_HOME to your