更新时间:2022-05-21 02:10:46
要在ubuntu上找到安装java的路径,可以运行来自终端的以下命令:
To find the path where java is installed on ubuntu, you can run the following command from terminal:
$ whereis java
你可能会得到这样的结果:
You may get something like this:
java: /usr/bin/java /etc/java /usr/share/java
这意味着java驻留在/ usr / bin / java
That mean that java resides in /usr/bin/java
因此,该目录应该在IntelliJ中指定。您可以在项目结构
中进行配置,按 Ctrl + Alt + Shift + S
,选择平台设置 - > SDKs
,点击绿色按钮(+)
,选择JDK的主目录。
So, that directory should designate in IntelliJ. You can configure in the Project Structure
, press Ctrl + Alt + Shift + S
, choose Platform Settings -> SDKs
, click on green button (+)
, select the home directory for JDK.