JDK 11 jdk.hotspot.agent.jmod - Hotspot Agent Module

JDK 11 jdk.hotspot.agent.jmod is the JMOD file for JDK 11 Hotspot Agent module.

JDK 11 Hotspot Agent module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\jdk.hotspot.agent.jmod.

JDK 11 Hotspot Agent module compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.

JDK 11 Hotspot Agent module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\jdk.hotspot.agent.

You can click and view the content of each source code file in the list below.

✍: FYIcenter

sun/jvm/hotspot/HelloWorld.java

/*
 * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
 * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 */

package sun.jvm.hotspot;

import java.lang.reflect.*;

public class HelloWorld {
  private static String helloWorldString = "Hello, world!";
  private static volatile int helloWorldTrigger = 0;
  private static final boolean useMethodInvoke = false;
  private static Object lock = new Object();

  public static void main(String[] args) {
    int foo = a();

    System.out.println("HelloWorld exiting. a() = " + foo);
  }

  private static int a() {
    return 1 + b();
  }

  private static int b() {
    return 1 + c();
  }

  private static int c() {
    return 1 + d("Hi");
  }

  private static int d(String x) {
    System.out.println("HelloWorld.d() received \"" + x + "\" as argument");
    synchronized(lock) {
      if (useMethodInvoke) {
        try {
          Method method = HelloWorld.class.getMethod("e");
          Integer result = (Integer) method.invoke(null, new Object[0]);
          return result.intValue();
        }
        catch (Exception e) {
          throw new RuntimeException(e.toString());
        }
      } else {

        int i = fib(10); // 89
        long l = i;
        float f = i;
        double d = i;
        char c = (char) i;
        short s = (short) i;
        byte b = (byte) i;

        int ret = e();

        System.out.println("Tenth Fibonacci number in all formats: " +
                           i + ", " +
                           l + ", " +
                           f + ", " +
                           d + ", " +
                           c + ", " +
                           s + ", " +
                           b);

        return ret;
      }
    }
  }

  public static int e() {
    System.out.println("Going to sleep...");

    int i = 0;

    while (helloWorldTrigger == 0) {
      if (++i == 1000000) {
        System.gc();
      }
    }

    System.out.println(helloWorldString);

    while (helloWorldTrigger != 0) {
    }

    return i;
  }

  // Tree-recursive implementation for test
  public static int fib(int n) {
    if (n < 2) {
      return 1;
    }
    return fib(n - 1) + fib(n - 2);
  }
}

sun/jvm/hotspot/HelloWorld.java

 

JDK 11 jdk.httpserver.jmod - HTTP Server Module

JDK 11 jdk.editpad.jmod - Edit Pad Module

Download and Use JDK 11

⇑⇑ FAQ for JDK (Java Development Kit)

2020-02-29, 23234👍, 0💬