背景 使用了 openSUSE 13.1, 13.2, 42.1 三个版本,每次都要折腾一遍 JAVA 环境。 这次把过程记录下来,以免下次再耗费时间。 发行版信息: 1 2 3 4 5 6 > lsb_release -a LSB Version: n/a Distributor ID: SUSE LINUX Description: openSUSE Leap 42.1 (x86_64) Release: 42.1 Codename: n/a OpenJDK 由于 Oracle 的授权许可,openSUSE 官方软件源不再提供 Oracle Java. 所以自从 openSUSE 12.1 开始,系统预装的是 OpenJDK. 而 openSUSE 42.1 中 openJDK 1.7 和 1.8 都有,其中 1.8 为默认版本。 1 2 3 4 5 6 7 > java - version openjdk version "1.8.0_72" OpenJDK Runtime Environment (build 1.8 .0 _72-b15) OpenJDK 64 -Bit Server VM (build 25.72 -b15, mixed mode) > javac If 'javac' is not a typo you can use command- not