public class Environment extends NetObject
.NET documentation at https://docs.microsoft.com/en-us/dotnet/api/System.Environment
Powered by JCOBridge: more info at https://www.jcobridge.com
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
assemblyFullName
Fully assembly qualified name: System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
|
static java.lang.String |
assemblyShortName
Assembly name: System.Private.CoreLib
|
static java.lang.String |
className
Qualified class name: System.Environment
|
static JCType |
classType
The type managed from JCOBridge.
|
| Constructor and Description |
|---|
Environment() |
Environment(java.lang.Object instance)
Internal constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static Environment |
cast(IJCOBridgeReflected from)
Try to cast the
IJCOBridgeReflected instance into Environment, a cast assert is made to check if types are compatible. |
static void |
Exit(int exitCode) |
static java.lang.String |
ExpandEnvironmentVariables(java.lang.String name) |
static void |
FailFast(java.lang.String message) |
static void |
FailFast(java.lang.String message,
NetException exception) |
static java.lang.String |
getCommandLine() |
static java.lang.String[] |
GetCommandLineArgs() |
static java.lang.String |
getCurrentDirectory() |
static int |
getCurrentManagedThreadId() |
static java.lang.String |
GetEnvironmentVariable(java.lang.String variable) |
static java.lang.String |
GetEnvironmentVariable(java.lang.String variable,
EnvironmentVariableTarget target) |
static IDictionary |
GetEnvironmentVariables() |
static IDictionary |
GetEnvironmentVariables(EnvironmentVariableTarget target) |
static int |
getExitCode() |
static boolean |
getHasShutdownStarted() |
static boolean |
getIs64BitOperatingSystem() |
static boolean |
getIs64BitProcess() |
static boolean |
getIsPrivilegedProcess() |
java.lang.String |
getJCOAssemblyName()
Returns the reflected Assembly name
|
java.lang.String |
getJCOClassName()
Returns the reflected Class name
|
java.lang.Object |
getJCOInstance()
Returns the instantiated class
|
java.lang.String |
getJCOObjectName()
Returns the reflected Class name used to build the object
|
JCType |
getJCOType()
Returns the instantiated class Type
|
static java.lang.String[] |
GetLogicalDrives() |
static java.lang.String |
getMachineName() |
static java.lang.String |
getNewLine() |
static OperatingSystem |
getOSVersion() |
static int |
getProcessId() |
static int |
getProcessorCount() |
static java.lang.String |
getProcessPath() |
static java.lang.String |
getStackTrace() |
static java.lang.String |
getSystemDirectory() |
static int |
getSystemPageSize() |
static int |
getTickCount() |
static long |
getTickCount64() |
static java.lang.String |
getUserDomainName() |
static boolean |
getUserInteractive() |
static java.lang.String |
getUserName() |
static Version |
getVersion() |
static long |
getWorkingSet() |
static void |
setCurrentDirectory(java.lang.String CurrentDirectory) |
static void |
SetEnvironmentVariable(java.lang.String variable,
java.lang.String value) |
static void |
SetEnvironmentVariable(java.lang.String variable,
java.lang.String value,
EnvironmentVariableTarget target) |
static void |
setExitCode(int ExitCode) |
void |
setJCOInstance(JCObject instance) |
public static final java.lang.String assemblyFullName
public static final java.lang.String assemblyShortName
public static final java.lang.String className
public Environment()
throws java.lang.Throwable
java.lang.Throwablepublic Environment(java.lang.Object instance)
throws java.lang.Throwable
java.lang.Throwablepublic static Environment cast(IJCOBridgeReflected from) throws java.lang.Throwable
IJCOBridgeReflected instance into Environment, a cast assert is made to check if types are compatible.from - IJCOBridgeReflected instance to be castedEnvironment instancejava.lang.Throwable - in case of error during cast operationpublic static void Exit(int exitCode)
throws java.lang.Throwable
java.lang.Throwablepublic static java.lang.String ExpandEnvironmentVariables(java.lang.String name)
throws java.lang.Throwable,
ArgumentException,
ArgumentOutOfRangeException,
PlatformNotSupportedException,
NotSupportedException,
ObjectDisposedException,
InvalidOperationException,
RankException,
ArrayTypeMismatchException,
ArgumentNullException,
IndexOutOfRangeException,
FormatException,
OutOfMemoryException
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionNotSupportedExceptionObjectDisposedExceptionInvalidOperationExceptionRankExceptionArrayTypeMismatchExceptionArgumentNullExceptionIndexOutOfRangeExceptionFormatExceptionOutOfMemoryExceptionpublic static void FailFast(java.lang.String message)
throws java.lang.Throwable,
ArgumentException,
NotSupportedException,
InvalidOperationException,
ArgumentOutOfRangeException,
PlatformNotSupportedException
java.lang.ThrowableArgumentExceptionNotSupportedExceptionInvalidOperationExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionpublic static void FailFast(java.lang.String message,
NetException exception)
throws java.lang.Throwable,
ArgumentException,
NotSupportedException,
InvalidOperationException,
ArgumentOutOfRangeException,
PlatformNotSupportedException
java.lang.ThrowableArgumentExceptionNotSupportedExceptionInvalidOperationExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionpublic static java.lang.String getCommandLine()
throws java.lang.Throwable,
NotSupportedException,
ArgumentException,
PlatformNotSupportedException,
ArgumentOutOfRangeException,
ArgumentNullException,
IndexOutOfRangeException,
RankException,
ArrayTypeMismatchException,
InvalidCastException,
ApplicationException
public static java.lang.String[] GetCommandLineArgs()
throws java.lang.Throwable,
ArgumentException,
NotSupportedException,
InvalidOperationException,
ArgumentOutOfRangeException,
IndexOutOfRangeException,
ArgumentNullException,
PlatformNotSupportedException
public static java.lang.String getCurrentDirectory()
throws java.lang.Throwable,
ArgumentException,
ArgumentOutOfRangeException,
PlatformNotSupportedException,
NotSupportedException,
ObjectDisposedException,
InvalidOperationException,
RankException,
ArrayTypeMismatchException,
IndexOutOfRangeException,
FormatException,
OutOfMemoryException,
CultureNotFoundException,
NullReferenceException,
ExternalException,
ArgumentNullException
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionNotSupportedExceptionObjectDisposedExceptionInvalidOperationExceptionRankExceptionArrayTypeMismatchExceptionIndexOutOfRangeExceptionFormatExceptionOutOfMemoryExceptionCultureNotFoundExceptionNullReferenceExceptionExternalExceptionArgumentNullExceptionpublic static int getCurrentManagedThreadId()
throws java.lang.Throwable
java.lang.Throwablepublic static java.lang.String GetEnvironmentVariable(java.lang.String variable)
throws java.lang.Throwable,
ArgumentException,
ArgumentOutOfRangeException,
PlatformNotSupportedException,
NotSupportedException,
ObjectDisposedException,
InvalidOperationException,
RankException,
ArrayTypeMismatchException,
ArgumentNullException
public static java.lang.String GetEnvironmentVariable(java.lang.String variable,
EnvironmentVariableTarget target)
throws java.lang.Throwable,
ArgumentException,
NotSupportedException,
InvalidOperationException,
ArgumentOutOfRangeException,
ArgumentNullException,
MissingMethodException,
TargetInvocationException,
PlatformNotSupportedException,
ObjectDisposedException,
SecurityException,
IOException,
ArrayTypeMismatchException,
IndexOutOfRangeException
java.lang.ThrowableArgumentExceptionNotSupportedExceptionInvalidOperationExceptionArgumentOutOfRangeExceptionArgumentNullExceptionMissingMethodExceptionTargetInvocationExceptionPlatformNotSupportedExceptionObjectDisposedExceptionSecurityExceptionIOExceptionArrayTypeMismatchExceptionIndexOutOfRangeExceptionpublic static IDictionary GetEnvironmentVariables() throws java.lang.Throwable, PlatformNotSupportedException, OutOfMemoryException, IndexOutOfRangeException, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, FormatException, NotSupportedException, InvalidOperationException
public static IDictionary GetEnvironmentVariables(EnvironmentVariableTarget target) throws java.lang.Throwable, PlatformNotSupportedException, OutOfMemoryException, ArgumentOutOfRangeException, ArgumentException, NotSupportedException, InvalidOperationException, MissingMethodException, TargetInvocationException, ObjectDisposedException, SecurityException, ArgumentNullException, IndexOutOfRangeException, RankException, ArrayTypeMismatchException, UnauthorizedAccessException, IOException, FormatException
java.lang.ThrowablePlatformNotSupportedExceptionOutOfMemoryExceptionArgumentOutOfRangeExceptionArgumentExceptionNotSupportedExceptionInvalidOperationExceptionMissingMethodExceptionTargetInvocationExceptionObjectDisposedExceptionSecurityExceptionArgumentNullExceptionIndexOutOfRangeExceptionRankExceptionArrayTypeMismatchExceptionUnauthorizedAccessExceptionIOExceptionFormatExceptionpublic static int getExitCode()
throws java.lang.Throwable
java.lang.Throwablepublic static boolean getHasShutdownStarted()
throws java.lang.Throwable
java.lang.Throwablepublic static boolean getIs64BitOperatingSystem()
throws java.lang.Throwable
java.lang.Throwablepublic static boolean getIs64BitProcess()
throws java.lang.Throwable
java.lang.Throwablepublic static boolean getIsPrivilegedProcess()
throws java.lang.Throwable,
PlatformNotSupportedException,
NotSupportedException,
ArgumentException,
MissingMethodException,
TargetInvocationException,
ObjectDisposedException,
FormatException,
InvalidOperationException,
OutOfMemoryException
public java.lang.String getJCOAssemblyName()
IJCOBridgeReflectedgetJCOAssemblyName in interface IJCOBridgeReflectedgetJCOAssemblyName in class NetObjectString representing the Fullname of reflected Assemblypublic java.lang.String getJCOClassName()
IJCOBridgeReflectedgetJCOClassName in interface IJCOBridgeReflectedgetJCOClassName in class NetObjectString representing the Fullname of reflected Classpublic java.lang.Object getJCOInstance()
IJCOBridgeReflectedgetJCOInstance in interface IJCOBridgeReflectedgetJCOInstance in class NetObjectObject representing the CLR instance of the instantiated Classpublic java.lang.String getJCOObjectName()
IJCOBridgeReflectedgetJCOObjectName in interface IJCOBridgeReflectedgetJCOObjectName in class NetObjectString representing the name used to allocated the object
in CLR contextpublic JCType getJCOType()
IJCOBridgeReflectedgetJCOType in interface IJCOBridgeReflectedgetJCOType in class NetObjectJCType representing the CLR Type of the instantiated Classpublic static java.lang.String[] GetLogicalDrives()
throws java.lang.Throwable,
ArgumentException,
ArgumentOutOfRangeException,
PlatformNotSupportedException,
NotSupportedException,
ObjectDisposedException,
InvalidOperationException,
RankException,
ArrayTypeMismatchException,
IndexOutOfRangeException,
FormatException,
OutOfMemoryException
public static java.lang.String getMachineName()
throws java.lang.Throwable,
ArgumentException,
ArgumentOutOfRangeException,
PlatformNotSupportedException,
NotSupportedException,
ObjectDisposedException,
InvalidOperationException,
RankException,
ArrayTypeMismatchException
public static java.lang.String getNewLine()
throws java.lang.Throwable
java.lang.Throwablepublic static OperatingSystem getOSVersion() throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, CultureNotFoundException, ObjectDisposedException
public static int getProcessId()
throws java.lang.Throwable
java.lang.Throwablepublic static int getProcessorCount()
throws java.lang.Throwable
java.lang.Throwablepublic static java.lang.String getProcessPath()
throws java.lang.Throwable,
ArgumentException,
ArgumentOutOfRangeException,
PlatformNotSupportedException,
NotSupportedException,
ObjectDisposedException,
InvalidOperationException,
RankException,
ArrayTypeMismatchException,
IndexOutOfRangeException,
FormatException,
OutOfMemoryException,
NullReferenceException
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionNotSupportedExceptionObjectDisposedExceptionInvalidOperationExceptionRankExceptionArrayTypeMismatchExceptionIndexOutOfRangeExceptionFormatExceptionOutOfMemoryExceptionNullReferenceExceptionpublic static java.lang.String getStackTrace()
throws java.lang.Throwable,
PlatformNotSupportedException,
ArgumentNullException,
TypeLoadException,
ArgumentException,
FileLoadException,
NotSupportedException,
MissingMethodException,
TargetInvocationException,
NullReferenceException,
CultureNotFoundException,
ArgumentOutOfRangeException,
ArrayTypeMismatchException,
OutOfMemoryException,
FormatException,
RankException,
IndexOutOfRangeException,
InvalidOperationException
java.lang.ThrowablePlatformNotSupportedExceptionArgumentNullExceptionTypeLoadExceptionArgumentExceptionFileLoadExceptionNotSupportedExceptionMissingMethodExceptionTargetInvocationExceptionNullReferenceExceptionCultureNotFoundExceptionArgumentOutOfRangeExceptionArrayTypeMismatchExceptionOutOfMemoryExceptionFormatExceptionRankExceptionIndexOutOfRangeExceptionInvalidOperationExceptionpublic static java.lang.String getSystemDirectory()
throws java.lang.Throwable,
ArgumentException,
ArgumentOutOfRangeException,
ArgumentNullException,
InvalidOperationException,
PlatformNotSupportedException,
ArrayTypeMismatchException,
NotSupportedException,
ObjectDisposedException,
RankException,
IndexOutOfRangeException,
FormatException,
OutOfMemoryException
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionArgumentNullExceptionInvalidOperationExceptionPlatformNotSupportedExceptionArrayTypeMismatchExceptionNotSupportedExceptionObjectDisposedExceptionRankExceptionIndexOutOfRangeExceptionFormatExceptionOutOfMemoryExceptionpublic static int getSystemPageSize()
throws java.lang.Throwable
java.lang.Throwablepublic static int getTickCount()
throws java.lang.Throwable
java.lang.Throwablepublic static long getTickCount64()
throws java.lang.Throwable
java.lang.Throwablepublic static java.lang.String getUserDomainName()
throws java.lang.Throwable,
ArgumentException,
ArgumentOutOfRangeException,
ArgumentNullException,
InvalidOperationException,
PlatformNotSupportedException,
ArrayTypeMismatchException,
NotSupportedException,
ObjectDisposedException,
RankException,
IndexOutOfRangeException,
FormatException
public static boolean getUserInteractive()
throws java.lang.Throwable
java.lang.Throwablepublic static java.lang.String getUserName()
throws java.lang.Throwable,
ArgumentException,
ArgumentOutOfRangeException,
ArgumentNullException,
InvalidOperationException,
PlatformNotSupportedException,
ArrayTypeMismatchException,
NotSupportedException,
ObjectDisposedException,
RankException,
IndexOutOfRangeException
public static Version getVersion() throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, IndexOutOfRangeException, FormatException
public static long getWorkingSet()
throws java.lang.Throwable
java.lang.Throwablepublic static void setCurrentDirectory(java.lang.String CurrentDirectory)
throws java.lang.Throwable,
NotSupportedException,
ArgumentException,
ArgumentNullException,
PlatformNotSupportedException,
IndexOutOfRangeException,
ArgumentOutOfRangeException,
InvalidOperationException,
FormatException,
OutOfMemoryException
public static void SetEnvironmentVariable(java.lang.String variable,
java.lang.String value)
throws java.lang.Throwable,
ArgumentNullException,
ArgumentException,
IndexOutOfRangeException,
PlatformNotSupportedException,
NotSupportedException,
ArgumentOutOfRangeException,
InvalidOperationException,
FormatException,
OutOfMemoryException
public static void SetEnvironmentVariable(java.lang.String variable,
java.lang.String value,
EnvironmentVariableTarget target)
throws java.lang.Throwable,
ArgumentNullException,
ArgumentException,
IndexOutOfRangeException,
PlatformNotSupportedException,
NotSupportedException,
ArgumentOutOfRangeException,
ArrayTypeMismatchException,
InvalidOperationException,
FormatException,
OutOfMemoryException,
MissingMethodException,
TargetInvocationException,
ObjectDisposedException,
SecurityException,
UnauthorizedAccessException,
IOException
java.lang.ThrowableArgumentNullExceptionArgumentExceptionIndexOutOfRangeExceptionPlatformNotSupportedExceptionNotSupportedExceptionArgumentOutOfRangeExceptionArrayTypeMismatchExceptionInvalidOperationExceptionFormatExceptionOutOfMemoryExceptionMissingMethodExceptionTargetInvocationExceptionObjectDisposedExceptionSecurityExceptionUnauthorizedAccessExceptionIOExceptionpublic static void setExitCode(int ExitCode)
throws java.lang.Throwable
java.lang.Throwablepublic void setJCOInstance(JCObject instance)
setJCOInstance in class NetObject