类javax.management.remote.rmi.RMIServer源码实例Demo

下面列出了怎么用javax.management.remote.rmi.RMIServer的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: dragonwell8_jdk   文件: ImplVersionCommand.java
public static void main(String[] args) throws Exception {

        // Create RMIJRMPServerImpl
        //
        System.out.println("Create RMIJRMPServerImpl");
        RMIServer server = new RMIJRMPServerImpl(0, null, null, null);

        // Get the JMX Remote impl version from RMIServer
        //
        System.out.println("Get JMX Remote implementation version from RMIServer");
        String full_version = server.getVersion();
        System.out.println("RMIServer.getVersion() = "+ full_version);
        String impl_version = full_version.substring(
            full_version.indexOf("java_runtime_")+"java_runtime_".length());

        // Display JMX Remote impl version and Java Runtime version
        //
        System.out.println("JMX Remote implementation version   = " +
                           impl_version);
        System.out.println("Java Runtime implementation version = " +
                           args[0]);

        // Check JMX Remote impl version vs. Java Runtime  version
        //
        if (!impl_version.equals(args[0])) {
            // Test FAILED
            throw new IllegalArgumentException(
                "***FAILED: JMX Remote and Java Runtime versions do NOT match***");
        }
        // Test OK!
        System.out.println("JMX Remote and Java Runtime versions match.");
        System.out.println("Bye! Bye!");
    }
 
源代码2 项目: TencentKona-8   文件: ImplVersionCommand.java
public static void main(String[] args) throws Exception {

        // Create RMIJRMPServerImpl
        //
        System.out.println("Create RMIJRMPServerImpl");
        RMIServer server = new RMIJRMPServerImpl(0, null, null, null);

        // Get the JMX Remote impl version from RMIServer
        //
        System.out.println("Get JMX Remote implementation version from RMIServer");
        String full_version = server.getVersion();
        System.out.println("RMIServer.getVersion() = "+ full_version);
        String impl_version = full_version.substring(
            full_version.indexOf("java_runtime_")+"java_runtime_".length());

        // Display JMX Remote impl version and Java Runtime version
        //
        System.out.println("JMX Remote implementation version   = " +
                           impl_version);
        System.out.println("Java Runtime implementation version = " +
                           args[0]);

        // Check JMX Remote impl version vs. Java Runtime  version
        //
        if (!impl_version.equals(args[0])) {
            // Test FAILED
            throw new IllegalArgumentException(
                "***FAILED: JMX Remote and Java Runtime versions do NOT match***");
        }
        // Test OK!
        System.out.println("JMX Remote and Java Runtime versions match.");
        System.out.println("Bye! Bye!");
    }
 
源代码3 项目: jdk8u60   文件: ImplVersionCommand.java
public static void main(String[] args) throws Exception {

        // Create RMIJRMPServerImpl
        //
        System.out.println("Create RMIJRMPServerImpl");
        RMIServer server = new RMIJRMPServerImpl(0, null, null, null);

        // Get the JMX Remote impl version from RMIServer
        //
        System.out.println("Get JMX Remote implementation version from RMIServer");
        String full_version = server.getVersion();
        System.out.println("RMIServer.getVersion() = "+ full_version);
        String impl_version = full_version.substring(
            full_version.indexOf("java_runtime_")+"java_runtime_".length());

        // Display JMX Remote impl version and Java Runtime version
        //
        System.out.println("JMX Remote implementation version   = " +
                           impl_version);
        System.out.println("Java Runtime implementation version = " +
                           args[0]);

        // Check JMX Remote impl version vs. Java Runtime  version
        //
        if (!impl_version.equals(args[0])) {
            // Test FAILED
            throw new IllegalArgumentException(
                "***FAILED: JMX Remote and Java Runtime versions do NOT match***");
        }
        // Test OK!
        System.out.println("JMX Remote and Java Runtime versions match.");
        System.out.println("Bye! Bye!");
    }
 
源代码4 项目: openjdk-jdk8u   文件: ImplVersionCommand.java
public static void main(String[] args) throws Exception {

        // Create RMIJRMPServerImpl
        //
        System.out.println("Create RMIJRMPServerImpl");
        RMIServer server = new RMIJRMPServerImpl(0, null, null, null);

        // Get the JMX Remote impl version from RMIServer
        //
        System.out.println("Get JMX Remote implementation version from RMIServer");
        String full_version = server.getVersion();
        System.out.println("RMIServer.getVersion() = "+ full_version);
        String impl_version = full_version.substring(
            full_version.indexOf("java_runtime_")+"java_runtime_".length());

        // Display JMX Remote impl version and Java Runtime version
        //
        System.out.println("JMX Remote implementation version   = " +
                           impl_version);
        System.out.println("Java Runtime implementation version = " +
                           args[0]);

        // Check JMX Remote impl version vs. Java Runtime  version
        //
        if (!impl_version.equals(args[0])) {
            // Test FAILED
            throw new IllegalArgumentException(
                "***FAILED: JMX Remote and Java Runtime versions do NOT match***");
        }
        // Test OK!
        System.out.println("JMX Remote and Java Runtime versions match.");
        System.out.println("Bye! Bye!");
    }
 
源代码5 项目: openjdk-jdk8u-backup   文件: ImplVersionCommand.java
public static void main(String[] args) throws Exception {

        // Create RMIJRMPServerImpl
        //
        System.out.println("Create RMIJRMPServerImpl");
        RMIServer server = new RMIJRMPServerImpl(0, null, null, null);

        // Get the JMX Remote impl version from RMIServer
        //
        System.out.println("Get JMX Remote implementation version from RMIServer");
        String full_version = server.getVersion();
        System.out.println("RMIServer.getVersion() = "+ full_version);
        String impl_version = full_version.substring(
            full_version.indexOf("java_runtime_")+"java_runtime_".length());

        // Display JMX Remote impl version and Java Runtime version
        //
        System.out.println("JMX Remote implementation version   = " +
                           impl_version);
        System.out.println("Java Runtime implementation version = " +
                           args[0]);

        // Check JMX Remote impl version vs. Java Runtime  version
        //
        if (!impl_version.equals(args[0])) {
            // Test FAILED
            throw new IllegalArgumentException(
                "***FAILED: JMX Remote and Java Runtime versions do NOT match***");
        }
        // Test OK!
        System.out.println("JMX Remote and Java Runtime versions match.");
        System.out.println("Bye! Bye!");
    }
 
源代码6 项目: openjdk-jdk9   文件: ImplVersionCommand.java
public static void main(String[] args) throws Exception {

        // Create RMIJRMPServerImpl
        //
        System.out.println("Create RMIJRMPServerImpl");
        RMIServer server = new RMIJRMPServerImpl(0, null, null, null);

        // Get the JMX Remote impl version from RMIServer
        //
        System.out.println("Get JMX Remote implementation version from RMIServer");
        String full_version = server.getVersion();
        System.out.println("RMIServer.getVersion() = "+ full_version);
        String impl_version = full_version.substring(
            full_version.indexOf("java_runtime_")+"java_runtime_".length());

        // Display JMX Remote impl version and Java Runtime version
        //
        System.out.println("JMX Remote implementation version   = " +
                           impl_version);
        System.out.println("Java Runtime implementation version = " +
                           args[0]);

        // Check JMX Remote impl version vs. Java Runtime  version
        //
        if (!impl_version.equals(args[0])) {
            // Test FAILED
            throw new IllegalArgumentException(
                "***FAILED: JMX Remote and Java Runtime versions do NOT match***");
        }
        // Test OK!
        System.out.println("JMX Remote and Java Runtime versions match.");
        System.out.println("Bye! Bye!");
    }
 
源代码7 项目: jdk8u-jdk   文件: ImplVersionCommand.java
public static void main(String[] args) throws Exception {

        // Create RMIJRMPServerImpl
        //
        System.out.println("Create RMIJRMPServerImpl");
        RMIServer server = new RMIJRMPServerImpl(0, null, null, null);

        // Get the JMX Remote impl version from RMIServer
        //
        System.out.println("Get JMX Remote implementation version from RMIServer");
        String full_version = server.getVersion();
        System.out.println("RMIServer.getVersion() = "+ full_version);
        String impl_version = full_version.substring(
            full_version.indexOf("java_runtime_")+"java_runtime_".length());

        // Display JMX Remote impl version and Java Runtime version
        //
        System.out.println("JMX Remote implementation version   = " +
                           impl_version);
        System.out.println("Java Runtime implementation version = " +
                           args[0]);

        // Check JMX Remote impl version vs. Java Runtime  version
        //
        if (!impl_version.equals(args[0])) {
            // Test FAILED
            throw new IllegalArgumentException(
                "***FAILED: JMX Remote and Java Runtime versions do NOT match***");
        }
        // Test OK!
        System.out.println("JMX Remote and Java Runtime versions match.");
        System.out.println("Bye! Bye!");
    }
 
源代码8 项目: hottub   文件: ImplVersionCommand.java
public static void main(String[] args) throws Exception {

        // Create RMIJRMPServerImpl
        //
        System.out.println("Create RMIJRMPServerImpl");
        RMIServer server = new RMIJRMPServerImpl(0, null, null, null);

        // Get the JMX Remote impl version from RMIServer
        //
        System.out.println("Get JMX Remote implementation version from RMIServer");
        String full_version = server.getVersion();
        System.out.println("RMIServer.getVersion() = "+ full_version);
        String impl_version = full_version.substring(
            full_version.indexOf("java_runtime_")+"java_runtime_".length());

        // Display JMX Remote impl version and Java Runtime version
        //
        System.out.println("JMX Remote implementation version   = " +
                           impl_version);
        System.out.println("Java Runtime implementation version = " +
                           args[0]);

        // Check JMX Remote impl version vs. Java Runtime  version
        //
        if (!impl_version.equals(args[0])) {
            // Test FAILED
            throw new IllegalArgumentException(
                "***FAILED: JMX Remote and Java Runtime versions do NOT match***");
        }
        // Test OK!
        System.out.println("JMX Remote and Java Runtime versions match.");
        System.out.println("Bye! Bye!");
    }
 
源代码9 项目: openjdk-8-source   文件: ImplVersionCommand.java
public static void main(String[] args) throws Exception {

        // Create RMIJRMPServerImpl
        //
        System.out.println("Create RMIJRMPServerImpl");
        RMIServer server = new RMIJRMPServerImpl(0, null, null, null);

        // Get the JMX Remote impl version from RMIServer
        //
        System.out.println("Get JMX Remote implementation version from RMIServer");
        String full_version = server.getVersion();
        System.out.println("RMIServer.getVersion() = "+ full_version);
        String impl_version = full_version.substring(
            full_version.indexOf("java_runtime_")+"java_runtime_".length());

        // Display JMX Remote impl version and Java Runtime version
        //
        System.out.println("JMX Remote implementation version   = " +
                           impl_version);
        System.out.println("Java Runtime implementation version = " +
                           args[0]);

        // Check JMX Remote impl version vs. Java Runtime  version
        //
        if (!impl_version.equals(args[0])) {
            // Test FAILED
            throw new IllegalArgumentException(
                "***FAILED: JMX Remote and Java Runtime versions do NOT match***");
        }
        // Test OK!
        System.out.println("JMX Remote and Java Runtime versions match.");
        System.out.println("Bye! Bye!");
    }
 
源代码10 项目: openjdk-8   文件: ImplVersionCommand.java
public static void main(String[] args) throws Exception {

        // Create RMIJRMPServerImpl
        //
        System.out.println("Create RMIJRMPServerImpl");
        RMIServer server = new RMIJRMPServerImpl(0, null, null, null);

        // Get the JMX Remote impl version from RMIServer
        //
        System.out.println("Get JMX Remote implementation version from RMIServer");
        String full_version = server.getVersion();
        System.out.println("RMIServer.getVersion() = "+ full_version);
        String impl_version = full_version.substring(
            full_version.indexOf("java_runtime_")+"java_runtime_".length());

        // Display JMX Remote impl version and Java Runtime version
        //
        System.out.println("JMX Remote implementation version   = " +
                           impl_version);
        System.out.println("Java Runtime implementation version = " +
                           args[0]);

        // Check JMX Remote impl version vs. Java Runtime  version
        //
        if (!impl_version.equals(args[0])) {
            // Test FAILED
            throw new IllegalArgumentException(
                "***FAILED: JMX Remote and Java Runtime versions do NOT match***");
        }
        // Test OK!
        System.out.println("JMX Remote and Java Runtime versions match.");
        System.out.println("Bye! Bye!");
    }
 
源代码11 项目: jdk8u_jdk   文件: ImplVersionCommand.java
public static void main(String[] args) throws Exception {

        // Create RMIJRMPServerImpl
        //
        System.out.println("Create RMIJRMPServerImpl");
        RMIServer server = new RMIJRMPServerImpl(0, null, null, null);

        // Get the JMX Remote impl version from RMIServer
        //
        System.out.println("Get JMX Remote implementation version from RMIServer");
        String full_version = server.getVersion();
        System.out.println("RMIServer.getVersion() = "+ full_version);
        String impl_version = full_version.substring(
            full_version.indexOf("java_runtime_")+"java_runtime_".length());

        // Display JMX Remote impl version and Java Runtime version
        //
        System.out.println("JMX Remote implementation version   = " +
                           impl_version);
        System.out.println("Java Runtime implementation version = " +
                           args[0]);

        // Check JMX Remote impl version vs. Java Runtime  version
        //
        if (!impl_version.equals(args[0])) {
            // Test FAILED
            throw new IllegalArgumentException(
                "***FAILED: JMX Remote and Java Runtime versions do NOT match***");
        }
        // Test OK!
        System.out.println("JMX Remote and Java Runtime versions match.");
        System.out.println("Bye! Bye!");
    }
 
源代码12 项目: jdk8u-jdk   文件: ImplVersionCommand.java
public static void main(String[] args) throws Exception {

        // Create RMIJRMPServerImpl
        //
        System.out.println("Create RMIJRMPServerImpl");
        RMIServer server = new RMIJRMPServerImpl(0, null, null, null);

        // Get the JMX Remote impl version from RMIServer
        //
        System.out.println("Get JMX Remote implementation version from RMIServer");
        String full_version = server.getVersion();
        System.out.println("RMIServer.getVersion() = "+ full_version);
        String impl_version = full_version.substring(
            full_version.indexOf("java_runtime_")+"java_runtime_".length());

        // Display JMX Remote impl version and Java Runtime version
        //
        System.out.println("JMX Remote implementation version   = " +
                           impl_version);
        System.out.println("Java Runtime implementation version = " +
                           args[0]);

        // Check JMX Remote impl version vs. Java Runtime  version
        //
        if (!impl_version.equals(args[0])) {
            // Test FAILED
            throw new IllegalArgumentException(
                "***FAILED: JMX Remote and Java Runtime versions do NOT match***");
        }
        // Test OK!
        System.out.println("JMX Remote and Java Runtime versions match.");
        System.out.println("Bye! Bye!");
    }
 
源代码13 项目: jdk8u-dev-jdk   文件: ImplVersionCommand.java
public static void main(String[] args) throws Exception {

        // Create RMIJRMPServerImpl
        //
        System.out.println("Create RMIJRMPServerImpl");
        RMIServer server = new RMIJRMPServerImpl(0, null, null, null);

        // Get the JMX Remote impl version from RMIServer
        //
        System.out.println("Get JMX Remote implementation version from RMIServer");
        String full_version = server.getVersion();
        System.out.println("RMIServer.getVersion() = "+ full_version);
        String impl_version = full_version.substring(
            full_version.indexOf("java_runtime_")+"java_runtime_".length());

        // Display JMX Remote impl version and Java Runtime version
        //
        System.out.println("JMX Remote implementation version   = " +
                           impl_version);
        System.out.println("Java Runtime implementation version = " +
                           args[0]);

        // Check JMX Remote impl version vs. Java Runtime  version
        //
        if (!impl_version.equals(args[0])) {
            // Test FAILED
            throw new IllegalArgumentException(
                "***FAILED: JMX Remote and Java Runtime versions do NOT match***");
        }
        // Test OK!
        System.out.println("JMX Remote and Java Runtime versions match.");
        System.out.println("Bye! Bye!");
    }
 
 类所在包
 类方法
 同包方法