简体   繁体   English

如何在 Ubuntu 服务器上安装 Java?

[英]How to install Java on Ubuntu Server?

I need to install Oracle JDK 11 on Ubuntu Server 18.04.我需要在 Ubuntu 服务器 18.04 上安装 Oracle JDK 11。 I have seen many tutorials but all of those point that I need to download this repository:我看过很多教程,但所有这些都是我需要下载这个存储库的:

sudo add-apt-repository ppa:linuxuprising/java

But it is not working.但它不起作用。 This is what I get:这就是我得到的:

错误 Linuxupprising 存储库

Also, I need to install Open JDK 14 in the same Ubuntu machine, but I'm unable to find working instructions.另外,我需要在同一台 Ubuntu 机器上安装 Open JDK 14,但我找不到工作说明。

Does somebody have any hints on these issues?有人对这些问题有任何提示吗?

Actually it should be possible to just type "sudo apt-get install openjdk-11-jdk" or "sudo apt-get install openjdk-14-jdk"实际上应该可以只输入“sudo apt-get install openjdk-11-jdk”或“sudo apt-get install openjdk-14-jdk”

This should Help you with all the OpenJDK stuff https://wiki.ubuntuusers.de/Java/Installation/OpenJDK/这应该可以帮助您解决所有 OpenJDK 的问题 https://wiki.ubuntuusers.de/Java/Installation/OpenJDK/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM