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

46
LINES

< > BotCompany Repo | #1016442 // System Version

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

Uses 911K of libraries. Click here for Pure Java version (11862L/64K).

1  
!7
2  
3  
cmodule SystemVersion > DynTextArea {
4  
  Int comp, compJavaX;
5  
  
6  
  start-thread {
7  
    setText(padWithEmptyLines(centerPad("Checking...", 50), 10));
8  
    
9  
    comp = compareTranspilationDateWithServer(creator());
10  
    try {
11  
      compJavaX = compareTranspilationDateWithServer(javax());
12  
    } catch e {
13  
      printException(e);
14  
      compJavaX = -1;
15  
    }
16  
17  
    setText(linesLL(
18  
      "Computer ID: " + computerID(),
19  
      "JavaX version: " + javaxVersion(),
20  
      "  On server: " + (compJavaX == null ? "Unknown" : compJavaX == 0 ? "SAME" : compJavaX < 0 ? "NEWER" : "OLDER (?)"),
21  
      "Stefan's OS version: " + formatTranspilationDate(creator()),
22  
      "  On server: " + (comp == null ? "Unknown" : comp == 0 ? "SAME" : comp < 0 ? "NEWER" : "OLDER (?)"),
23  
      "System identified as: " + linuxWindowsMac(),
24  
      "Java version: " + javaVersion(),
25  
      "Java directory: " + envJavaHome(),
26  
      "Java VM arguments: " + joinWithSpace(vmArguments()),
27  
    );
28  
  }
29  
30  
  visual centerAndSouth(super,
31  
    withMargin(jcenteredbuttons("Upgrade JavaX", disableAllButtonsWhileCalcing(r {
32  
      setText("Upgrading JavaX...");
33  
      runDependent(#1001639);
34  
      dm_restartOS()
35  
    }), "Upgrade Stefan's OS", r dm_restartOS,
36  
    jPopDownButton_noText(
37  
      "Show Java VM options", rThread { showWrappedText("This Java VM's options", joinWithSpace(vmArgs())) },
38  
      "Set default Java VM options...", rThread {
39  
        inputText("Default Java VM options", javaxDefaultVMArgs(), voidfunc(S s) {
40  
          setDefaultVMArgs(s);
41  
          if (confirmYesNo("Restart " + dm_osName() + " to use new options?"))
42  
            dm_restartOS();
43  
        });
44  
      }
45  
    ))));
46  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1016442
Snippet name: System Version
Eternal ID of this version: #1016442/27
Text MD5: d5d0ed1393f940125954a4cc1820cf4d
Transpilation MD5: 005c30af37cea256416e113289a49f63
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: 2020-09-23 10:37:39
Source code size: 1696 bytes / 46 lines
Pitched / IR pitched: No / No
Views / Downloads: 494 / 51279
Version history: 26 change(s)
Referenced in: [show references]