Is it possible to load a class without loading referenced classes/imports?
问题 (Yes, this is hacky and probably not best practice, but it is the least bulky solution) I have a project that involves several jars - a runnable launcher, a server, a wrapper for the server, and plugins for the server. The launcher runs the wrapper by starting a new unconnected process, a child process, or just by instantiating it, depending on config. This should be unimportant with regards to the issue. The wrapper uses URLClassLoader to load the server jar and start it, which works fine.