-
Bug
-
Resolution: Fixed
-
P2
-
9-repo-jigsaw
jigsaw/jake has just been sync'ed up so it now has jshell. Unfortunately it requires changes to work with modules, here's an example:
-> System.out.println("hi")
Exception in thread "main" java.lang.reflect.InaccessibleObjectException: Unable to make member of class REPL.$REPL9 accessible: module jdk.jshell does not read <unnamed module @51565ec2>
at sun.reflect.Reflection.throwInaccessibleObjectException(java.base@9.0/Reflection.java:464)
at java.lang.reflect.Acce| State engine terminated. See /history
ssibleObject.checkCanSetAccessible(java.base@9.0/AccessibleObject.java:175)
at java.lang.reflect.Method.checkCanSetAccessible(java.base@9.0/Method.java:189)
at java.lang.reflect.Method.setAccessible(java.base@9.0/Method.java:183)
at jdk.internal.jshell.remote.RemoteAgent.commandLoop(jdk.jshell@9.0/RemoteAgent.java:109)
at jdk.internal.jshell.remote.RemoteAgent.main(jdk.jshell@9.0/RemoteAgent.java:56)
The main issue is that jshell is a named module that needs to access types in unnamed modules.
An additional issue is that jshell launches the debuggee with -Xbootclasspath, that option has been removed.
In addition, we need to look at the tests. All jshell tests are currently failing in jake, probably because they are missing @modules.
-> System.out.println("hi")
Exception in thread "main" java.lang.reflect.InaccessibleObjectException: Unable to make member of class REPL.$REPL9 accessible: module jdk.jshell does not read <unnamed module @51565ec2>
at sun.reflect.Reflection.throwInaccessibleObjectException(java.base@9.0/Reflection.java:464)
at java.lang.reflect.Acce| State engine terminated. See /history
ssibleObject.checkCanSetAccessible(java.base@9.0/AccessibleObject.java:175)
at java.lang.reflect.Method.checkCanSetAccessible(java.base@9.0/Method.java:189)
at java.lang.reflect.Method.setAccessible(java.base@9.0/Method.java:183)
at jdk.internal.jshell.remote.RemoteAgent.commandLoop(jdk.jshell@9.0/RemoteAgent.java:109)
at jdk.internal.jshell.remote.RemoteAgent.main(jdk.jshell@9.0/RemoteAgent.java:56)
The main issue is that jshell is a named module that needs to access types in unnamed modules.
An additional issue is that jshell launches the debuggee with -Xbootclasspath, that option has been removed.
In addition, we need to look at the tests. All jshell tests are currently failing in jake, probably because they are missing @modules.