OpenJDK 9 IntelliJ IDEA(Ubuntu)“无法解析符号” [英] OpenJDK 9 IntelliJ IDEA (Ubuntu) "Can't resolve Symbol"
问题描述
我最近在Ubuntu 17.10下安装了openJDK 9,似乎IntelliJ IDEA遇到了麻烦。
每当我创建一个新项目时,IntelliJ都可以找到JDK,但是好像它没有以正确的方式配置它。以下是它的样子
它说'无法解析符号'字符串''。
当我通过终端甚至Eclipse编译时,一切正常。
当我输入'java --version'时,它说
openjdk 9-Ubuntu
OpenJDK运行时环境(构建9-Ubuntu + 0-9b181-4)
OpenJDK 64位服务器VM(构建9-Ubuntu + 0- 9b181-4,混合模式)
有没有办法解决这个问题?
的问题是关系到在 LIB / JRT-fs.jar 文件的openjdk-9的Debian的包装。此文件编译错误。
报告此错误在这里,还有一个更完整的此处回答。
如果您坚持使用openjdk,可以等待新版本或尝试使用启动板上的推荐选项从源代码构建它。
I recently installed openJDK 9 under Ubuntu 17.10 and it seems like IntelliJ IDEA has trouble with it.
Whenever I create a new project IntelliJ can find the JDK, but it seems like it's not configuring it the right way. Here is how it looks like
when I create a HelloWorld.java example it looks like this
and it says 'Can't resolve symbol 'String''.
Everything works fine when I compile via terminal and even with Eclipse.
When I type 'java --version' it says
openjdk 9-Ubuntu
OpenJDK Runtime Environment (build 9-Ubuntu+0-9b181-4)
OpenJDK 64-Bit Server VM (build 9-Ubuntu+0-9b181-4, mixed mode)
Is there a way to fix this problem?
The problem is related to Debian packaging of openjdk-9 in the lib/jrt-fs.jar file. This file is compiled incorrectly.
This bug is reported here and there is a more complete Answer here.
If you insist to make use of openjdk you might wait for the new versions or try to build it from the source using the recommended options on the launchpad.
这篇关于OpenJDK 9 IntelliJ IDEA(Ubuntu)“无法解析符号”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!