简体   繁体   English

如何通过选项(而不是通过安装)为 AWS Cloud9 设置 JDK 19 Oracle?

[英]How to set JDK 19 Oracle for AWS Cloud9 by option (not by install)?

I checked我检查了

ec2-user:~/environment $ java -version
openjdk version "11.0.17" 2022-10-18 LTS
OpenJDK Runtime Environment Corretto-11.0.17.8.1 (build 11.0.17+8-LTS)
OpenJDK 64-Bit Server VM Corretto-11.0.17.8.1 (build 11.0.17+8-LTS, mixed mode)
ec2-user:~/environment $ javac --version
javac 11.0.17
ec2-user:~/environment $ 

在此处输入图像描述

How to set JDK 19 Oracle for AWS Cloud9 by option (not by install)?如何通过选项(而不是通过安装)为 AWS Cloud9 设置 JDK 19 Oracle?

Unclear what environment you're using, but in either case of EC2, or SSH, you'll need to install JDK 19 using the appropriate OS package manager, or tools such as SDKMan.不清楚您使用的是什么环境,但无论是 EC2 还是 SSH,您都需要使用相应的操作系统 package 管理器或 SDKMan 等工具安装 JDK 19。 Gradle nor the IDE will download it for you, nor will it be the default as long as Java 11 (or 17) are considered LTS. Gradle 和 IDE 都不会为您下载,也不会默认,只要 Java 11(或 17)被视为 LTS。 Best to create your own AMI with it pre-installed.最好创建自己的 AMI 并预先安装它。

Or otherwise, use a Dockerfile with Gradle and JDK 19 to compile and/or run your code.或者,使用带有 Gradle 和 JDK 19 的 Dockerfile 来编译和/或运行您的代码。

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

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