Hitachi

uCosminexus Application Server Definition Reference Guide


14.2 Details of JavaVM extension options

This section explains the details of the JavaVM extension options.

The following Java programs are used as examples in this document:

Java Program example 1
class Example1 {
  public static void main(String[] args) {
    Example1 e1 = new Example1();
    Object obj = new Object();
    e1.method(1, 'Q', obj); // 5th line
  }
 
  void method(int l1, char l2, Object l3) {
    float l4 = 4.0f;
    boolean l5 = true;
    double l6 = Double.MAX_VALUE; // double type maximum value
    Object[] l7 = new Object[10];
 
    try {
     exception-occurred // 15th line
    } catch (Exception e) {
     e.printStackTrace();
    }
  }
}
Java Program example 2
class Example2 {
  public static void main(String[] args) {
    Example2 e2 = new Example2();
    e2.method(); // 4th line
  }
 
  synchronized void method() {
    int l1 = 1;
    float l2 = 2.0f;
    String l3 = "local 3";
    Character l4 = new Character('X');
    Object l5 = new Thread();
    Object[] l6 = new Thread[10];
 
    thread-dump-is-output // 15th line
  }
}
Java Program example 3
class Example3 {
  public static void main(String[] args) {
    Example3 e3 = new Example3();
    e3.method(); // 4th line
  }
 
  void method() {
    String l1 = "local 1";
    StringBuffer l2 = new StringBuffer(l1);
    l2.append(" + local 2");
    Boolean l3 = new Boolean(false);
    Character l4 = new Character('X');
    Long l5 = new Long(Long.MIN_VALUE); // long type minimum value
    Object l6 = new Thread();
    Object[] l7 = new Thread[10];
 
    try {
     exception-occurred // 18th line
    } catch (Exception e) {
     e.printStackTrace();
    }
  }
 
  public String toString() {
    return "I am an Example3 instance.";
  }
}
Organization of this section