Java 11 JShell inside Intellij IDEA

人走茶凉 提交于 2019-11-30 02:52:09

问题


I have Java 11 JDK and IntelliJ IDEA 2018.2.4 (64-bit). When I was using Java 10.0.2, the JShell console in IntelliJ IDEA worked fine. Now that I've upgraded to Java 11, the JShell console has stopped working. Nothing at all happens when I click on the Run button or when I hit Ctrl+Enter (see screenshot).

My projects compile and run just fine using Java 11 - it's only the JShell console that doesn't work. (Also, JShell works fine from the Command Prompt, it's only inside IDEA that it doesn't work.) I can reproduce this issue on two machines, one at home running IDEA Community Edition 2018.2.4 and the other at work running Ultimate 2018.2.3.

Is there some configuration I need to do in order to fix this?


回答1:


This seems like a bug registered with JetBrains - IDEA-197466 (reported on version 2018.3)

The reason mostly as it looks like is because of the --add-modules java.xml.bind there.

Since the module java.xml.bind no more exists in the JDK/11.

Edit: As verified by you, this has been resolved in 2018.3 version of IntelliJ.



来源:https://stackoverflow.com/questions/52680237/java-11-jshell-inside-intellij-idea

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!