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

add classpath modification through JDI

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      windows_7

      Description

      A DESCRIPTION OF THE REQUEST :
      It would be good if PathSearchingVirtualMachine or a sub-interface like PathAppendingVirtualMachine, would allow directories and jar files to be added to the classpath of the target virtual machine.

      It looks like we could use an agent class to add jars to the classpath but not directories. Even if it could do both this would be cumbersome. Being able to do it directly through JDI would be ideal.


      JUSTIFICATION :
      We use the JDI to implement an REPL system. The user can open source files and if necessary, the root path for their corresponding classes will be added to the classpath of the virtual machine that is running the REPL system. In Java 8 and earlier systems this was possible because the system class loader was a URLClassLoader.


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Would like a PathAppendingVirtualMachine sub-interface of PathSearchingVirtualMachine that would be implemented by the VirtualMachine in a typical debug session and would have a method: addToClassPath(URL) or similar.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated: