public class

SystemUtil

extends Object
java.lang.Object
   ↳ com.pnfsoftware.jeb.util.base.SystemUtil

Class Overview

Convenient variables and methods to retrieve OS and running JVM information.

Summary

Fields
public static final String javaspecversion Java specification version string
public static final String javavendor Java vendor
public static final String javaversion Java version string
public static final String osarch Bitness of the currently executing JRE (this is not the OS bitness!)
public static final String osname Operating system name
public static final String osversion Operating system version string
Public Constructors
SystemUtil()
Public Methods
static String getJavaSpecificationVersion()
static String getJavaVendor()
static String getJavaVersion()
static int getMajorJavaVersion()
Extract the major number from the Java VM executing the method.
static String getOsArchitecture()
static String getOsName()
static String getOsVersion()
static int parseMajorJavaVersion(String s)
Extract the major number from a standard Java version string.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public static final String javaspecversion

Java specification version string

public static final String javavendor

Java vendor

public static final String javaversion

Java version string

public static final String osarch

Bitness of the currently executing JRE (this is not the OS bitness!)

public static final String osname

Operating system name

public static final String osversion

Operating system version string

Public Constructors

public SystemUtil ()

Public Methods

public static String getJavaSpecificationVersion ()

public static String getJavaVendor ()

public static String getJavaVersion ()

public static int getMajorJavaVersion ()

Extract the major number from the Java VM executing the method.

Returns
  • the major version, 0 on error

public static String getOsArchitecture ()

Returns
  • the bitness of the currently executing JRE (this is not the OS bitness!)

public static String getOsName ()

public static String getOsVersion ()

public static int parseMajorJavaVersion (String s)

Extract the major number from a standard Java version string.

Parameters
s version string
Returns
  • the major version, 0 on error