Java 发生非法的反射访问操作
我试图在VisualStudio代码中使用Kotlin。我刚刚选择完环境路径,但当我尝试运行程序时,每次都会收到以下警告:Java 发生非法的反射访问操作,java,kotlin,visual-studio-code,warnings,Java,Kotlin,Visual Studio Code,Warnings,我试图在VisualStudio代码中使用Kotlin。我刚刚选择完环境路径,但当我尝试运行程序时,每次都会收到以下警告: WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.intellij.util.ReflectionUtil to method java.util.ResourceBundle.setParent(java.util.R
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.intellij.util.ReflectionUtil to method java.util.ResourceBundle.setParent(java.util.ResourceBundle)
WARNING: Please consider reporting this to the maintainers of com.intellij.util.ReflectionUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
如果我试着跑
--illegal-access=deny
我得到以下错误:
error: unresolved reference: illegal
--illegal-access=deny
^
error: variable expected
--illegal-access=deny
^
error: unresolved reference: access
--illegal-access=deny
^
error: unresolved reference: deny
--illegal-access=deny
我是个新手,怎么解决这个问题呢?
谢谢你的回答 我知道这很烦人,但实际上你不需要担心。您可以使用该标志运行程序,而不必担心警告。要获得更深入的详细信息,有许多资源,例如,用于更详细信息的资源。它更多的是促使图书馆作者采取行动,而不是其他任何事情 需要将该标志传递给执行程序的java命令
Ex
java--非法访问=deny--module path--module/[args…]
我猜是这个bug,它将在Kotlin 1.5中修复:好的,谢谢!我正在等待更新或其他信息://