MCPcopy Create free account
hub / github.com/XUANXUQAQ/File-Engine / main

Method main

src/main/java/file/engine/MainClass.java:35–71  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

33public class MainClass {
34
35 public static void main(String[] args) {
36 try {
37 setSystemProperties();
38
39 if (!System.getProperty("os.arch").contains("64")) {
40 JOptionPane.showMessageDialog(null, "Not 64 Bit", "ERROR", JOptionPane.ERROR_MESSAGE);
41 throw new RuntimeException("Not 64 Bit");
42 }
43 updatePlugins();
44
45 initFoldersAndFiles();
46 releaseAllDependence();
47 initEventManagement();
48 updateLauncher();
49 //清空tmp
50 FileUtil.deleteDir(new File("tmp"));
51 //兼容以前版本,将data文件夹移动到core
52 File data = new File("data");
53 if (data.exists()) {
54 FileUtil.copyDir("data", "core\\data");
55 FileUtil.deleteDir(data);
56 Files.delete(Path.of("data"));
57 }
58 sendStartCoreEvent();
59 setAllConfigs();
60 checkConfigs();
61 // 初始化全部完成,发出启动系统事件
62 if (sendBootSystemSignal()) {
63 JOptionPane.showMessageDialog(null, "Boot system failed", "ERROR", JOptionPane.ERROR_MESSAGE);
64 throw new RuntimeException("Boot System Failed");
65 }
66 checkVersion();
67 } catch (Exception e) {
68 log.error("error: {}", e.getMessage(), e);
69 System.exit(-1);
70 }
71 }
72
73 /**
74 * 更新启动器

Callers

nothing calls this directly

Calls 14

setSystemPropertiesMethod · 0.95
updatePluginsMethod · 0.95
initFoldersAndFilesMethod · 0.95
releaseAllDependenceMethod · 0.95
initEventManagementMethod · 0.95
updateLauncherMethod · 0.95
deleteDirMethod · 0.95
copyDirMethod · 0.95
sendStartCoreEventMethod · 0.95
setAllConfigsMethod · 0.95
checkConfigsMethod · 0.95
sendBootSystemSignalMethod · 0.95

Tested by

no test coverage detected