Libraryless. Click here for Pure Java version (14829L/105K).
1 | !7 |
2 | |
3 | sclass CheckJDKPath > DynPrintLog { |
4 | S cmd; |
5 | Bool found, ok; |
6 | S output; |
7 | |
8 | JComponent visualize() { |
9 | ret withCenteredButtons(super.visualize(), "Do it", rThread doIt); |
10 | } |
11 | |
12 | void doIt { |
13 | setFields(found := null, ok := null, output := null); |
14 | setField(cmd := _javaCommand()); |
15 | print("Current Java command: " + cmd); |
16 | setField(found := isAbsolutePath(cmd) ? fileExists(cmd) : isOnPATH(cmd)); |
17 | print("File found: " + yesno(found)); |
18 | set backtick_verbose; |
19 | setField(output := backtick(cmd + " -version")); |
20 | setField(ok := !cic(output, "Error:")); |
21 | print(); |
22 | setModuleName(print(ok ? "OK!" : "Not OK.") + " - " + programTitleWithoutBracketStuff()); |
23 | } |
24 | } |
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: | 436 / 577 |
Version history: | 5 change(s) |
Referenced in: | [show references] |