Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
A.2. Configure the Default Java Development Kit on Red Hat Enterprise Linux
alternatives command.
Important
Note
Prerequisites
- In order to complete this task, you need to have superuser access, either through direct login or by means of the
sudocommand.
Procedure A.2. Configure the Default Java Development Kit
Determine the paths for your preferred
javaandjavacbinaries.You can use the commandrpm -ql packagename |grep binto find the locations of binaries installed from RPMs. The default locations of thejavaandjavacbinaries on Red Hat Enterprise Linux 32-bit systems are as follows.Expand Table A.1. Default locations for java and javac binaries Java Development Kit Path OpenJDK 1.6 /usr/lib/jvm/jre-1.6.0-openjdk/bin/java/usr/lib/jvm/java-1.6.0-openjdk/bin/javacOracle JDK 1.6 /usr/lib/jvm/jre-1.6.0-sun/bin/java/usr/lib/jvm/java-1.6.0-sun/bin/javacSet the alternative you wish to use for each.
Run the following commands to set your system to use a specificjavaandjavac:/usr/sbin/alternatives --config javaor/usr/sbin/alternatives --config javac. Follow the on-screen instructions.Optional: Set the
java_sdk_1.6.0alternative choice.If you want to use Oracle JDK, you need to set the alternative forjava_sdk_1.6.0.as well. Use the following command:/usr/sbin/alternatives --config java_sdk_1.6.0. The correct path is usually/usr/lib/jvm/java-1.6.0-sun. You can do a file listing to verify it.
The alternative Java Development Kit is selected and active.