I have added the java.management module to my build path:
Java Build Path -> Libraries -> Modulepath -> Is modular -> Edit
I'm having this issue with:
InstanceAlreadyExistsException
MBeanRegistrationException
NotCompliantMBeanException
MalformedObjectNameException
If I look at these sources, they all extend Exceptions that are in the classpath (included modules) and go all the way up to java.lang.Exception that implements Throwable. For example:
in javax.management InstanceAlreadyExistsException extends OperationsException
in javax.management OperationsException extends JMException
in javax.management JMException extends java.lang.Exception
in java.lang Exception implements Throwable
So how on Earth is InstanceAlreadyExistsException not a subclass of Throwable? https://docs.oracle.com/javase/10/docs/api/javax/management/InstanceAlreadyExistsException.html