Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

10
LINES

< > BotCompany Repo | #1001122 - getPID

JavaX fragment (include)

static S processID_cached;

// try to get our current process ID
static S getPID() {
  if (processID_cached == null) {
    S name = ManagementFactory.getRuntimeMXBean().getName();
    processID_cached = name.replaceAll("@.*", "");
  }
  ret processID_cached;
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1001122
Snippet name: getPID
Eternal ID of this version: #1001122/1
Text MD5: 88c88b82a932ca6f198d5a004137ef3b
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-12-26 13:39:23
Source code size: 269 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 404 / 2125
Referenced in: [show references]

Formerly at http://tinybrain.de/1001122 & http://1001122.tinybrain.de