bash: javac: command not found...
1、
[root@PC3 yum.repos.d]# java -version
java version "1.7.0_51"
OpenJDK Runtime Environment (rhel-2.4.5.5.el7-x86_64 u51-b31)
OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)
2、
[root@PC3 yum.repos.d]# yum list java*
Loaded plugins: langpacks, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Installed Packages
java-1.7.0-openjdk.x86_64 1:1.7.0.51-2.4.5.5.el7 @anaconda/7.0
java-1.7.0-openjdk-headless.x86_64 1:1.7.0.51-2.4.5.5.el7 @anaconda/7.0
javapackages-tools.noarch 3.4.1-5.el7 @anaconda/7.0
Available Packages
java-1.6.0-openjdk.x86_64 1:1.6.0.0-6.1.13.1.el7 rhel7
java-1.6.0-openjdk-devel.x86_64 1:1.6.0.0-6.1.13.1.el7 rhel7
java-1.7.0-openjdk-devel.x86_64 1:1.7.0.51-2.4.5.5.el7 rhel7
java-atk-wrapper.i686 0.30.4-5.el7 rhel7
java-atk-wrapper.x86_64 0.30.4-5.el7 rhel7
javamail.noarch 1.4.6-8.el7 rhel7
javassist.noarch 3.16.1-10.el7 rhel7
3、
[root@PC3 yum.repos.d]# yum install java-1.7.0-openjdk-devel.x86_64
Loaded plugins: langpacks, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Resolving Dependencies
--> Running transaction check
---> Package java-1.7.0-openjdk-devel.x86_64 1:1.7.0.51-2.4.5.5.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=====================================================================================================================================
Package Arch Version Repository Size
=====================================================================================================================================
Installing:
java-1.7.0-openjdk-devel x86_64 1:1.7.0.51-2.4.5.5.el7 rhel7 9.1 M
Transaction Summary
=====================================================================================================================================
Install 1 Package
Total download size: 9.1 M
Installed size: 36 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : 1:java-1.7.0-openjdk-devel-1.7.0.51-2.4.5.5.el7.x86_64 1/1
rhel7/productid | 1.6 kB 00:00:00
Verifying : 1:java-1.7.0-openjdk-devel-1.7.0.51-2.4.5.5.el7.x86_64 1/1
Installed:
java-1.7.0-openjdk-devel.x86_64 1:1.7.0.51-2.4.5.5.el7
Complete!
4、
[root@PC3 yum.repos.d]# javac -version
javac 1.7.0_51