ubuntu安装jdk

  1. Download the Oracle Java JRE for Linux
  2. Copy the Oracle Java binaries into the /usr/local/java directory
  3. Unpack the compressed Java binaries, in the directory /usr/local/java
  4. Edit the system PATH file /etc/profile and add the following system variables to your system path
  5. Inform your Ubuntu Linux system where your Oracle Java JRE is located
    update-alternatives java后,还需要设置当前默认的java解释器和编译器。据wikihow说还要reload profile,但我没有做这一步

参考:

  • How to Install Oracle Java JRE on Ubuntu Linux
  • Java安装配置


你可能感兴趣的:(ubuntu安装jdk)