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

24
LINES

< > BotCompany Repo | #1016752 // Check JDK Path [Is JDK available for nohup? - Dyn Module]

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Libraryless. Click here for Pure Java version (14829L/105K).

!7

sclass CheckJDKPath > DynPrintLog {
  S cmd;
  Bool found, ok;
  S output;
  
  JComponent visualize() {
    ret withCenteredButtons(super.visualize(), "Do it", rThread doIt);
  }
  
  void doIt {
    setFields(found := null, ok := null, output := null);
    setField(cmd := _javaCommand());
    print("Current Java command: " + cmd);
    setField(found := isAbsolutePath(cmd) ? fileExists(cmd) : isOnPATH(cmd));
    print("File found: " + yesno(found));
    set backtick_verbose;
    setField(output := backtick(cmd + " -version"));
    setField(ok := !cic(output, "Error:"));
    print();
    setModuleName(print(ok ? "OK!" : "Not OK.") + " - " + programTitleWithoutBracketStuff());
  }
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1016752
Snippet name: Check JDK Path [Is JDK available for nohup? - Dyn Module]
Eternal ID of this version: #1016752/6
Text MD5: c2e2efaa064e2d4cd4548bc3da8c7234
Transpilation MD5: dd32468a4133f11c05beac20e7376db3
Author: stefan
Category: javax / stefan's os
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-07-01 15:52:44
Source code size: 717 bytes / 24 lines
Pitched / IR pitched: No / No
Views / Downloads: 366 / 483
Version history: 5 change(s)
Referenced in: [show references]