-
Notifications
You must be signed in to change notification settings - Fork 7
Installation: Java 7
The Java 7 runtime environment is required to run Tomcat, Fedora, and Solr.
-
Verify that Java 7 is installed by entering the command
which java
in the terminal window. This should return /usr/bin/java. Additionally, enteringjava -version
should return java version 1.7.x. If Java 7 is installed, proceed to Step 3. -
If Java 7 is not installed, use your package manager to install it.
Ubuntu:
sudo apt-get install openjdk-7-jdk
CentOS:
-
Enter the command
sudo yum install java-1.7.0-openjdk-devel
in the terminal window. -
Type
Y
when asked "Is this ok [y/N]".The final output should look like this (with the ... indicating system generated code that has been intentionally left out of these instructions):
[user.ip.address] sudo yum install java-1.7.0-openjdk-devel
...
Transaction Summary
=============================================================================
Install: 15 Package(s)
Total download size: 38 M
Installed size: 134 M
Is this ok [y/N]: Y
...
Complete!
-
-
You now need to configure your machine to use Java 7. Enter the command
sudo update-alternatives --config java
in the terminal window. You will see all available versions of Java. Select Java 7. The final output should look similar to this:There is 1 program that provides 'java'.
Selection Command
-----------------------------------------------
*+ 1 /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/javaEnter to keep the current selection[+], or type selection number: 1
Enter the command java -version
in the terminal window. This should return java version 1.7.x.
Proceed to Install Tomcat or return to the Overview page.