Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8143007

jshell needs to be updated to work with modules

    XMLWordPrintable

    Details

      Description

      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.

        Attachments

          Activity

            People

            Assignee:
            jlahoda Jan Lahoda
            Reporter:
            alanb Alan Bateman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: