gpt4 book ai didi

java - 尝试在 Ubuntu 上运行 jshell 时,当前未安装程序 'jshell'

转载 作者:行者123 更新时间:2023-11-30 02:10:28 25 4
gpt4 key购买 nike

我已经下载并“手动”安装了适用于 Linux 64 位版本的 JDK 10(适用于 Ubuntu 16.04), Oracle Java SE Development Kit(注意:我想下载 Java9 JDK,但它不再受支持,我被称为 Java 10 SE 开发工具包)。

当我尝试从终端窗口运行 jshell 时,出现以下错误,

The program 'jshell' is currently not installed. To run 'jshell' please ask your administrator to install the package 'openjdk-9-jdk-headless' You will have to enable the component called 'universe'

enter image description here

enter image description here

enter image description here

enter image description here

我不知道为什么当我安装了经典的java版本时,消息要求我安装openjdk。当我运行“which jshell”时,我没有收到任何返回的详细信息。

任何人都可以帮助我安装并运行 jshell 吗?

最佳答案

JShell 是一个开发工具。您应该下载并安装Java Development Kit来运行jshell,而不仅仅是Java运行时环境。

关于java - 尝试在 Ubuntu 上运行 jshell 时,当前未安装程序 'jshell',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50270361/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com