Package javax.tools.diagnostics.runtime.java

Examples of javax.tools.diagnostics.runtime.java.JavaRuntime


  }

  static private JavaRuntime runtime;

  public void setUp() throws Exception {
    JavaRuntime currentRuntime = getJavaRuntime();

    if (runtime != null && currentRuntime.equals(runtime)) {
      return;
    }

    runtime = getJavaRuntime();
View Full Code Here


    findMonitors();
  }

  public void findMonitors() throws Exception {
    JavaRuntime runtime = getJavaRuntime();

    Iterator monitorIterator = runtime.getMonitors().iterator();

    // Search through all monitors for this test's monitor.
    while (monitorIterator.hasNext()) {
      Object next = monitorIterator.next();
View Full Code Here

 
  public void testJavaJavaRuntime_getVersion() throws CorruptDataException, DataUnavailable
  {
   
    JavaRuntime runtime=getJavaRuntime();
    String version=runtime.getVersion();
    System.out.println("runtime.getVersion "+version);
    assertNotNull(version);
  }
View Full Code Here

  }

  public void testJavaJavaRuntime_getVersionDetail() throws CorruptDataException, DataUnavailable
  {
   
    JavaRuntime runtime=getJavaRuntime();
    String version=runtime.getVersion();
   
   
    JavaVMInitArgs args=runtime.getJavaVMInitArgs();
    Iterator i=args.getOptions().iterator();
    while(i.hasNext()) {
      JavaVMOption option=(JavaVMOption) i.next();
      String data=option.getOptionString();
      if(data.startsWith(SetupJavaRuntime.DTCK_TEST_RUNTIME_VERSION)) {
View Full Code Here

    fail("expected to see vm option for system property starting "+SetupJavaRuntime.DTCK_TEST_RUNTIME_VERSION);
  }
 
  public void testJavaRuntime_getFullVersion()
  {
    JavaRuntime runtime=(JavaRuntime) getJavaRuntime();
    String theFV=null;
    try {
      theFV=runtime.getFullVersion();
    } catch (CorruptDataException e) {
      fail();
    }
    assertNotNull(theFV);
    assertTrue(theFV.length() > 0);
View Full Code Here

  public void testJavaClassLoader_getJavaObject()
  {
    boolean foundClassLoader = false;

    JavaRuntime runtime=getJavaRuntime();
    Iterator classloaders = runtime.getJavaClassLoaders().iterator();

    while (classloaders.hasNext()) {
      Object nextClassloader = classloaders.next();
      if (nextClassloader instanceof CorruptData) {
        System.err.println("returned CorruptData `" + nextClassloader + "'");
View Full Code Here

   */
  public void testJavaClass_getName()
  {
    boolean foundClassName = false;

    JavaRuntime runtime=getJavaRuntime();

    Iterator heaps = runtime.getHeaps().iterator();

    while (heaps.hasNext()) {
      Object nextHeap = heaps.next();
      if (nextHeap instanceof CorruptData) {
        System.err.println("returned CorruptData `" + nextHeap + "'");
View Full Code Here

 
  public void testJavaThread()
  {
    boolean foundThread = false;

    JavaRuntime runtime=getJavaRuntime();

    Iterator threads = runtime.getThreads().iterator();

    while (threads.hasNext()) {
      Object next = threads.next();

      if (next instanceof CorruptData) {
View Full Code Here

//  }


 
  public void setUp () {
    JavaRuntime runtime = getJavaRuntime();
    Iterator threads = runtime.getThreads().iterator();
    JavaThread contrivedThread = null;
    while (threads.hasNext()) {
      Object next = threads.next();
     
      if (next instanceof JavaThread) {
View Full Code Here

protected JavaHeap getPopulatedJavaHeap() throws IOException {
  Image populated=getPopulatedImage();
  ImageAddressSpace space=(ImageAddressSpace)populated.getAddressSpaces().get(0);
  ImageProcess process=space.getCurrentProcess();
  JavaRuntime rt=(JavaRuntime) process.getRuntimes().get(0);
  return (JavaHeap) rt.getHeaps().get(0);
  
}
View Full Code Here

TOP

Related Classes of javax.tools.diagnostics.runtime.java.JavaRuntime

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.