./src/windows/classes/java/lang/ProcessImpl.java

Print this page

        

*** 328,333 **** --- 328,351 ---- */ private static native long openForAtomicAppend(String path) throws IOException; private static native boolean closeHandle(long handle); + + private static native int getProcessId(long handle); + private static native String getModuleBaseName(int pid); + + @Override + public int getPid() { + if (!isAlive()) { + return -1; + } else { + return getProcessId(handle); + } + } + + @Override + public String getProcessName(int pid) { + return getModuleBaseName(pid); + } + }