I am on the mini centos6.8 network with Yum 163 source installed JDK.
First I was installed with the Yum Group of Java Platform (Java platform), after installation in/usr/lib/jvm/java-xxxxxxx have this JDK, Bart can use the Java command after installation, I was also a face, no matter, to a wave of environmental variables set first, Vi/etc/profile, flip-flops, source/etc/profile, see java-version have shown me leisurely go out to smoke a cigarette.
Smoke back plan to write a HelloWorld try, write after Javac Helloworld.java, newspaper no Javac command, manual black Meng Force ... First echo $PATH, see if there is no JDK path, no problem, in fact, when I smoke is already thinking, why there is no so-called Dt.jar and Tools.jar, must have the same as me, so the Niang ah.
Okay, I also toss for a few hours, yum installation is convenient, can be installed in what is not your decision, sometimes installed you do not know how to find it, Bastard said I open a window to find, we this is only the minimum version of the Command interface (knock on the blackboard. No graphical interface, CD to CD to go, locate and find go to it, installation has prompted you to install what software, but find the old driver said, do not casually use, I also listen to the old driver, no why, for the sake of the load of the server.
Checked for so long, environment configuration also set a time, a face Meng forced to look at no Dt.jar and Tools.jar folder, in fact, I also think of the old driver said, this situation is nothing but is covered, to separate the two jars can only, good, then I install again, yum Groupinstall Java Platform, error, installed, then execute
Yum Search java-1.7
See java-1.7.0-openjdk-devel.x86_64 This, of course you can serach is java-1.8, indifferent, you are happy, and then look at the following introduction: OPENJDK Development environment, yes, That's what we're going to do next.
Yum-y Install java-1.7.0-openjdk-devel.x86_64
Waiting for the good news ....
Installation is finished, someone to ask, to uninstall before the Yum group installed, anyway, I did not uninstall, I also installed in the depressed group of Java platform exactly what kind of stuff.
Install finished go to/USR/LIB/JVM to see, go into java-1.7.0-openjdk-devel.x86_64 folder ll, find a bit different, Bin folder will be a bit, there are Java, there are javac,cd. Out came to the Lib folder ll, found to have Dt.jar and Tools.jar two packages, then is to reset the environment variable, the finished can use Java can also use Javac, very SAO, strong invincible.
If the JDK is installed in RPM, you can customize the place you want to install the operation, but also very stable, set what is not wrong, each has its own benefits.
The above is just I did not find the most appropriate solution, I tried, the test of useful practices, specific if there are any problems also hope that the old driver, Daniel, younger brother Beginners Linux, Wang Haihan