Sharing dynamically loaded classes with JShell instance
问题 Please view the edits below I'm trying to create a JShell instance that gives me access to, and lets me interact with objects in the JVM it was created in. This works fine with classes that have been available at compile time but fails for classes that are loaded dynamically . public class Main { public static final int A = 1; public static Main M; public static void main(String[] args) throws Exception { M = new Main(); ClassLoader cl = new URLClassLoader(new URL[]{new File("Example.jar")