When more than one Java is installed in a Linux system, we can switch the Java version automatically when the original configuration file is not modified:
[Email protected] ~]# update-alternatives--config java
650) this.width=650; "title=" 3118.tmp.jpg "style=" height:160px;width:737px "src=" http://s4.51cto.com/wyfs02/M00/ 89/20/wkiom1gicoew4dxbaaau_kx0tym965.jpg "width=" 881 "height=" 156 "alt=" Wkiom1gicoew4dxbaaau_kx0tym965.jpg "/>
To maintain the current value press Enter or type the selected number: 2
650) this.width=650; "title=" Image.png "style=" height:685px;width:740px "src=" http://s5.51cto.com/wyfs02/M01/89/ 20/wkiom1gicviyvisvaadon6fwsko747.png "width=" 1071 "height=" 677 "alt=" Wkiom1gicviyvisvaadon6fwsko747.png "/>
View version of the switch over, compared to manually to modify the original configuration file more convenient!
This article is from the "ZPP" blog, make sure to keep this source http://1439337369.blog.51cto.com/10270624/1863892
Use the update-alternatives command to modify the Java version-automatically switch Java version