(String[] args)
| 33 | public 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 | * 更新启动器 |
nothing calls this directly
no test coverage detected