private static ProcessHandle getCurrentProcess ( ) { try { return ( ProcessHandle ) ProcessHandle . class . getDeclaredMethod ( "current" ) . invoke ( null ) ; } catch ( ReflectiveOperationException ex ) { InternalLogger . log ( Level . ERROR , ex , "Failed to receive the handle of the current process" ) ; return null ; } }
Gets the process handle of the current process .