jdk/test/java/rmi/testlibrary/JavaVM.java
changeset 43066 bc2234c64fbd
parent 42775 a45fa7082c81
child 43296 0f1ac3527db2
equal deleted inserted replaced
43065:23e5bc13ec20 43066:bc2234c64fbd
     1 /*
     1 /*
     2  * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   228         }
   228         }
   229         vm = null;
   229         vm = null;
   230     }
   230     }
   231 
   231 
   232     /**
   232     /**
       
   233      * Return exit value for vm process.
       
   234      * @return exit value for vm process
       
   235      * @throws IllegalThreadStateException if the vm process has not yet terminated
       
   236      */
       
   237     public int exitValue() {
       
   238         return vm.exitValue();
       
   239     }
       
   240 
       
   241     /**
       
   242      * Destroy the vm process, and do necessary cleanup.
       
   243      */
       
   244     public void cleanup() {
       
   245         destroy();
       
   246     }
       
   247 
       
   248     /**
   233      * Destroys the VM, waits for it to terminate, and returns
   249      * Destroys the VM, waits for it to terminate, and returns
   234      * its exit status.
   250      * its exit status.
   235      *
   251      *
   236      * @throws IllegalStateException if the VM has already been destroyed
   252      * @throws IllegalStateException if the VM has already been destroyed
   237      * @throws InterruptedException if the caller is interrupted while waiting
   253      * @throws InterruptedException if the caller is interrupted while waiting