如何在Ubuntu上为VS Code配置和下载Java JDK。

huangapple go评论104阅读模式
英文:

How To Configure and Download Java JDK in ubuntu for VS code

问题

我尝试在Java中运行VS Code,但VS Code显示一个错误(未指向JDK)。
在Ubuntu中有没有任何方法可以在VS Code中运行Java程序。

英文:

I've tried to run vscode in java but the vs code is showing an error of (Not Pointing To JDK).
Is there is any way to run java programs in vs code in ubuntu.

答案1

得分: 0

从这里安装Java 从这里安装Java 从这里安装Java 从这里安装Java 从这里安装Java

https://code.visualstudio.com/docs/java/java-debugging#:~:text=您可以手动安装,Code for the first time.

英文:

Install java from here Install java from here Install java from here Install java from here Install java from here

https://code.visualstudio.com/docs/java/java-debugging#:~:text=You%20can%20manually%20install%20the,Code%20for%20the%20first%20time.

答案2

得分: 0

最简单的方法是运行:

sudo apt-get install openjdk- 然后按下TAB键多次查看可用选项。

然后您可以选择一个特定的jdk。

一些示例:

sudo apt-get install openjdk-14-jdk

sudo apt-get install openjdk-13-jdk

sudo apt-get install openjdk-11-jdk

之后,您可以重新启动VSCode。

英文:

The simplest way is to run:

sudo apt-get install openjdk- and to press TAB several times for available options.

You will then choose a specific jdk.

Some examples:

sudo apt-get install openjdk-14-jdk

sudo apt-get install openjdk-13-jdk

sudo apt-get install openjdk-11-jdk

Afterwards you can restart VSCode.

huangapple
  • 本文由 发表于 2020年8月25日 17:57:14
  • 转载请务必保留本文链接:https://go.coder-hub.com/63576373.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定