Intellij IDEA中的Java 11 JShell [英] Java 11 JShell inside Intellij IDEA

查看:1609
本文介绍了Intellij IDEA中的Java 11 JShell的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有Java 11 JDK和IntelliJ IDEA 2018.2.4(64位)。当我使用Java 10.0.2时,IntelliJ IDEA中的JShell控制台工作正常。现在我已升级到Java 11,JShell控制台已停止工作。单击运行按钮或按Ctrl + Enter(参见屏幕截图)时,什么都没发生。

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).

我的项目使用Java 11编译和运行很好 - 它是只有JShell控制台不起作用。 (此外,JShell在命令提示符下工作正常,它只在IDEA内部无效。)我可以在两台机器上重现这个问题,一台在家运行IDEA Community Edition 2018.2.4,另一台在运行Ultimate 2018.2的工作.3。

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?

推荐答案

这似乎是 JetBrains注册的错误 - IDEA-197466 (报告版本 2018.3

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

主要原因是因为 - add-modules java.xml.bind 那里。

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

由于模块 java.xml.bind JDK / 11中不再存在

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

编辑 经过您的验证,这已在2018.3版本的IntelliJ中得到解决。

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

这篇关于Intellij IDEA中的Java 11 JShell的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆