无法在Ubuntu中使用终端安装Java 22
我一直在尝试使用DEB文件使用终端安装Java。但是,终端继续显示3行并退出。
(Reading database ... 212600 files and directories currently installed.)
Preparing to unpack jdk-18_linux-x64_bin.deb ...
Unpacking jdk-18 (18.0.1.1-ga) over (18.0.1.1-ga) ...
Setting up jdk-18 (18.0.1.1-ga) ...
shiddalingayya@shiddalingayya-ThinkPad-E15-Gen-2:~/Downloads$
I have been trying to install java using deb file using terminal. However terminal keep on showing 3 lines and exiting.
(Reading database ... 212600 files and directories currently installed.)
Preparing to unpack jdk-18_linux-x64_bin.deb ...
Unpacking jdk-18 (18.0.1.1-ga) over (18.0.1.1-ga) ...
Setting up jdk-18 (18.0.1.1-ga) ...
shiddalingayya@shiddalingayya-ThinkPad-E15-Gen-2:~/Downloads$
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我所知,安装似乎成功完成。我看不到任何错误。
您可能会问的是,为什么不能在命令行中使用
Java
Javac 。您需要在
java
命令中首先设置path
和java_home
环境变量。检查此帖子以查看如何做。
From what I can tell, the installation seems to finish successfully. I don't see any errors.
What you might ask is why can't you use the
java
orjavac
in the command line.You need to set your
PATH
andJAVA_HOME
environment variables first, before thejava
command becomes available everywhere.Check this post to see how to do that.