jdk/src/share/classes/sun/management/VMManagementImpl.java
changeset 23333 b0af2c7c8c91
parent 21640 6bbdcc430310
equal deleted inserted replaced
23332:c36c4773fe96 23333:b0af2c7c8c91
    35 import java.util.List;
    35 import java.util.List;
    36 import java.util.Arrays;
    36 import java.util.Arrays;
    37 import java.util.Collections;
    37 import java.util.Collections;
    38 import java.security.AccessController;
    38 import java.security.AccessController;
    39 import java.security.PrivilegedAction;
    39 import java.security.PrivilegedAction;
    40 import sun.security.action.GetPropertyAction;
       
    41 
    40 
    42 /**
    41 /**
    43  * Implementation of VMManagement interface that accesses the management
    42  * Implementation of VMManagement interface that accesses the management
    44  * attributes and operations locally within the same Java virtual
    43  * attributes and operations locally within the same Java virtual
    45  * machine.
    44  * machine.
   171     public String   getLibraryPath()  {
   170     public String   getLibraryPath()  {
   172         return System.getProperty("java.library.path");
   171         return System.getProperty("java.library.path");
   173     }
   172     }
   174 
   173 
   175     public String   getBootClassPath( ) {
   174     public String   getBootClassPath( ) {
   176         PrivilegedAction<String> pa
   175         return AccessController.doPrivileged(
   177             = new GetPropertyAction("sun.boot.class.path");
   176             (PrivilegedAction<String>) () -> System.getProperty("sun.boot.class.path"));
   178         String result =  AccessController.doPrivileged(pa);
       
   179         return result;
       
   180     }
   177     }
   181 
   178 
   182     public long getUptime() {
   179     public long getUptime() {
   183         return getUptime0();
   180         return getUptime0();
   184     }
   181     }