public JPMFactory()
{
if ( !SystemUtils.isJavaVersionAtLeast( 150 ) )
{
jpm =
new UnsupportedJavaProcessManager( "JDK version " + SystemUtils.JAVA_RUNTIME_VERSION
+ " doesn't support this command" );
return;
}
JavaProcessManager j;
try
{
ClassLoader cl = JConsoleClassLoaderFactory.getClassLoader();
if ( SystemUtils.IS_JAVA_1_5 )
{
j = new Jdk5JavaProcessManager( cl );
}
else
{
j = new Jdk6JavaProcessManager( cl );
}
}
catch ( ClassNotFoundException e )
{
j =
new UnsupportedJavaProcessManager( e.getMessage() + ", operation on this JDK("
+ SystemUtils.JAVA_RUNTIME_VERSION + ") isn't fully supported", e );
}
catch ( Exception e )
{
j = new UnsupportedJavaProcessManager( e );
}
jpm = j;
}