< prev index next >

test/lib/testlibrary/jdk/testlibrary/Platform.java

Print this page




  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 package jdk.testlibrary;
  25 import java.util.regex.Pattern;
  26 import java.io.RandomAccessFile;
  27 import java.io.FileNotFoundException;
  28 import java.io.IOException;
  29 
  30 /**
  31  * @deprecated This class is deprecated. Use the one from
  32  *             {@code <root>/test/lib/share/classes/jdk/test/lib}
  33  */
  34 @Deprecated
  35 public class Platform {
  36     private static final String osName      = System.getProperty("os.name");
  37     private static final String dataModel   = System.getProperty("sun.arch.data.model");
  38     private static final String vmVersion   = System.getProperty("java.vm.version");
  39     private static final String jdkDebug    = System.getProperty("jdk.debug");
  40     private static final String osArch      = System.getProperty("os.arch");
  41     private static final String vmName      = System.getProperty("java.vm.name");
  42     private static final String userName    = System.getProperty("user.name");
  43     private static final String compiler    = System.getProperty("sun.management.compiler");
  44 
  45     public static boolean isClient() {
  46         return vmName.endsWith(" Client VM");
  47     }
  48 
  49     public static boolean isServer() {
  50         return vmName.endsWith(" Server VM");
  51     }
  52 




  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 package jdk.testlibrary;
  25 import java.util.regex.Pattern;
  26 import java.io.RandomAccessFile;
  27 import java.io.FileNotFoundException;
  28 import java.io.IOException;
  29 
  30 /**
  31  * @deprecated This class is deprecated. Use the one from
  32  *             {@code <root>/test/lib/jdk/test/lib}
  33  */
  34 @Deprecated
  35 public class Platform {
  36     private static final String osName      = System.getProperty("os.name");
  37     private static final String dataModel   = System.getProperty("sun.arch.data.model");
  38     private static final String vmVersion   = System.getProperty("java.vm.version");
  39     private static final String jdkDebug    = System.getProperty("jdk.debug");
  40     private static final String osArch      = System.getProperty("os.arch");
  41     private static final String vmName      = System.getProperty("java.vm.name");
  42     private static final String userName    = System.getProperty("user.name");
  43     private static final String compiler    = System.getProperty("sun.management.compiler");
  44 
  45     public static boolean isClient() {
  46         return vmName.endsWith(" Client VM");
  47     }
  48 
  49     public static boolean isServer() {
  50         return vmName.endsWith(" Server VM");
  51     }
  52 


< prev index next >