mirror of
https://github.com/LCTT/TranslateProject.git
synced 2024-12-26 21:30:55 +08:00
translated
This commit is contained in:
parent
7b761a7d01
commit
471e64aa4f
@ -1,82 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Oracle Announces Java 14! How to Install it on Ubuntu Linux)
|
||||
[#]: via: (https://itsfoss.com/java-14-ubuntu/)
|
||||
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
||||
|
||||
Oracle Announces Java 14! How to Install it on Ubuntu Linux
|
||||
======
|
||||
|
||||
Recently, Oracle announced the general availability of Java 14 (or the Oracle JDK 14). If you are someone who wants to have the latest and greatest to experiment and develop stuff – you can try installing Java 14 on your Linux system.
|
||||
|
||||
Oracle JDK 14 (or simply Java 14) [release][1] includes a couple of new features if you’re interested to preview them. I’ve linked them below:
|
||||
|
||||
* [Pattern matching for instanceof][2]
|
||||
* [Records][3]
|
||||
* [Text Blocks][4]
|
||||
|
||||
|
||||
|
||||
In addition to the preview features, it packs in several improvements and additions. Quoting the press release, they mentioned the additional improvements as well:
|
||||
|
||||
> Additionally, the latest Java release adds Java language support for switch expressions, exposes new APIs for continuous monitoring of JDK Flight Recorder data, extends the availability of the low-latency Z Garbage Collector to macOS and Windows, and adds, in incubator modules, the packaging of self-contained Java applications and a new Foreign memory access API for safe, efficient access to memory outside of the Java heap.
|
||||
|
||||
Of course, if you want to dive into the exact details, you should check the [official announcement][1].
|
||||
|
||||
In this tutorial, I’ll show you the easy way to get Java 14 installed on your Ubuntu system. Read on.
|
||||
|
||||
**Note:** If you opt for Oracle Java 11 or above, you should learn about the new [Oracle Technology Network License Agreement][5] to know how it affects personal users, developers, and commercial organizations. Usually, these are free to use for development and testing – but not for production.
|
||||
|
||||
### How To Install Java 14 on Ubuntu Linux?
|
||||
|
||||
![][6]
|
||||
|
||||
For reference, I’ve successfully tried it on **Pop!_OS 19.10** where I had the **OpenJDK 11** installed as the default.
|
||||
|
||||
Here, we are going to use the Java 14 installer (originally based on WebUpd8 Java Package) by [Linux Uprising][7].
|
||||
|
||||
Simply enter the commands below in the terminal to get it installed:
|
||||
|
||||
```
|
||||
sudo add-apt-repository ppa:linuxuprising/java
|
||||
sudo apt update
|
||||
sudo apt install oracle-java14-installer
|
||||
```
|
||||
|
||||
This should do the job. And, when it’s done, if you want to make it the default, you can type in the following command to do it:
|
||||
|
||||
```
|
||||
sudo apt install oracle-java14-set-default
|
||||
```
|
||||
|
||||
It is worth noting that this is only for Ubuntu-based distributions. If you want to install it on Debian and other Linux distributions, you can follow [Linux Uprising’s detailed guide][7] on installing Java 14 as well.
|
||||
|
||||
### Wrapping Up
|
||||
|
||||
Of course, while this is about the bleeding edge features – if you do not want to break things, you might want to hold on to Java 11. If you want to experiment while knowing the risks, go ahead and give it a try!
|
||||
|
||||
Feel free to let me know your thoughts on Java 14 in the comments below.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/java-14-ubuntu/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.oracle.com/corporate/pressrelease/oracle-announces-java14-031720.html
|
||||
[2]: https://openjdk.java.net/jeps/305
|
||||
[3]: https://openjdk.java.net/jeps/359
|
||||
[4]: https://openjdk.java.net/jeps/368
|
||||
[5]: https://www.oracle.com/technetwork/java/javase/overview/oracle-jdk-faqs.html
|
||||
[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/install-java-14-ubuntu.png?ssl=1
|
||||
[7]: https://www.linuxuprising.com/2020/03/how-to-install-oracle-java-14-jdk14-on.html
|
@ -0,0 +1,82 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Oracle Announces Java 14! How to Install it on Ubuntu Linux)
|
||||
[#]: via: (https://itsfoss.com/java-14-ubuntu/)
|
||||
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
||||
|
||||
Oracle 发布 Java 14!如何在 Ubuntu Linux 上安装
|
||||
======
|
||||
|
||||
最近,Oracle 宣布 Java 14(或 Oracle JDK 14)正式开放。如果你想进行最新的实验或者开发的话,那么你可以试试在 Linux 系统上安装 Java 14。
|
||||
|
||||
Oracle JDK 14(或简称 Java 14)[发行版][1]包含几个新功能,如果你想预览它们的话。我已添加了链接:
|
||||
|
||||
* [instanceof 的模式匹配][2]
|
||||
* [Records][3]
|
||||
* [Text Blocks][4]
|
||||
|
||||
|
||||
|
||||
除预览功能外,它还包含一些改进和补充。在新闻中,他们还提到了其他改进:
|
||||
|
||||
>此外,最新的 Java 版本增加了 Java 语言对 switch 表达式的支持,新增了用于持续监控 JDK Flight Recorder 数据的新 API,将低延迟 zgc 扩展到了 macOS 和 Windows,并添加在 incubator 模块中,独立的 Java 应用打包和为了安全的新的外部内存访问 API 来有效地访问 Java 堆外部的内存。
|
||||
|
||||
当然,如果你想详细了解细节,那么你应查看[官方公告][1]。
|
||||
|
||||
在本教程中,我将向你展示在 Ubuntu 系统上安装 Java 14 的简便方法。继续阅读。
|
||||
|
||||
**注意:**如果你选择 Oracle Java 11 或更高版本,那么应该了解新的 [Oracle 技术网络许可协议][5],以了解它如何影响个人用户、开发人员和商业组织。通常,它们可以免费用于开发和测试,但不能用于生产。
|
||||
|
||||
### 如何在 Ubuntu Linux 上安装 Java 14?
|
||||
|
||||
![][6]
|
||||
|
||||
作为参考,我已成功在默认安装 **OpenJDK 11** 的 **Pop!_OS 19.10** 上成功安装了它。
|
||||
|
||||
这里,我们将使用 [Linux Uprising][7] 的 Java 14 安装程序(最初基于 WebUpd8 Java 软件包)。
|
||||
|
||||
只需在终端中输入以下命令即可进行安装:
|
||||
|
||||
```
|
||||
sudo add-apt-repository ppa:linuxuprising/java
|
||||
sudo apt update
|
||||
sudo apt install oracle-java14-installer
|
||||
```
|
||||
|
||||
这应该就完成了,如果你想将它设为默认,那么你可以输入以下命令:
|
||||
|
||||
```
|
||||
sudo apt install oracle-java14-set-default
|
||||
```
|
||||
|
||||
值得注意的是,这仅适用于基于 Ubuntu 的发行版。如果要在 Debian 和其他 Linux 发行版上安装它,那么也可以按照 [Linux Uprising 中的详细指南][7]安装 Java 14。
|
||||
|
||||
### 总结
|
||||
|
||||
当然,这些是最新的特性,如果你不想破环环境,你或许会希望继续使用 Java11。如果你想在了解风险的情况下进行试验,请继续尝试!
|
||||
|
||||
欢迎在下面的评论中让我知道你对 Java 14 的想法。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/java-14-ubuntu/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.oracle.com/corporate/pressrelease/oracle-announces-java14-031720.html
|
||||
[2]: https://openjdk.java.net/jeps/305
|
||||
[3]: https://openjdk.java.net/jeps/359
|
||||
[4]: https://openjdk.java.net/jeps/368
|
||||
[5]: https://www.oracle.com/technetwork/java/javase/overview/oracle-jdk-faqs.html
|
||||
[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/install-java-14-ubuntu.png?ssl=1
|
||||
[7]: https://www.linuxuprising.com/2020/03/how-to-install-oracle-java-14-jdk14-on.html
|
Loading…
Reference in New Issue
Block a user