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