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

21
LINES

< > BotCompany Repo | #1025015 // Generic Standalone Runner (for packageProgram)

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Libraryless. Click here for Pure Java version (11983L/84K).

1  
!7
2  
3  
mainClassName DaMain p {
4  
  try {
5  
    File jar = getMainJarLocation();
6  
    print("DaMain 2. " + f2s(jar));
7  
    S struct = loadMandatoryTextFileFromZip(jar, "start.struct");
8  
    print(+struct);
9  
    setDefaultClassFinder(func(S name) -> Class {
10  
      try Class c = findClass_fullName(name);
11  
      if (startsWith(name, "main$"))
12  
        try Class c = findClass_fullName("DaMain" + substring(name, 4));
13  
      null;
14  
    });
15  
    Standalone_OSWithSplashScreens s = cast unstructure(struct);
16  
    print("Unstructured.");
17  
    printStruct(s);
18  
    printStruct(+args);
19  
    s.run(args);
20  
  } catch e { print(getStackTrace_noRecord(e)); }
21  
}

Author comment

Began life as a copy of #1024623

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1025015
Snippet name: Generic Standalone Runner (for packageProgram)
Eternal ID of this version: #1025015/19
Text MD5: 050175dbce03acddd98df7d3e600057c
Transpilation MD5: 2f7c0947c5d5f94198e6c8244729616f
Author: stefan
Category: javax
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-09-01 13:21:50
Source code size: 649 bytes / 21 lines
Pitched / IR pitched: No / No
Views / Downloads: 213 / 1067
Version history: 18 change(s)
Referenced in: [show references]