MCPcopy Create free account
hub / github.com/DeNA/PacketProxy / main

Method main

src/main/java/core/packetproxy/PacketProxy.java:33–78  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

31public class PacketProxy {
32
33 public static void main(String[] args) {
34
35 if (Utils.supportedJava() == false) {
36
37 JOptionPane.showMessageDialog(null, I18nString.get("PacketProxy can be executed with JDK17 or later"),
38 I18nString.get("Error"), JOptionPane.ERROR_MESSAGE);
39 return;
40 }
41
42 Splash splash = new Splash();
43 splash.show();
44
45 while (true) {
46
47 try {
48
49 PacketProxy proxy = new PacketProxy();
50 proxy.start();
51 } catch (SQLException e) {
52
53 int option = JOptionPane.showConfirmDialog(null,
54 I18nString.get("Database read error.\nDelete the database and reboot?"),
55 I18nString.get("Database error"), JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
56 if (option == JOptionPane.YES_OPTION) {
57
58 try {
59
60 File resource = new File((Database.getInstance()).getDatabasePath().toString());
61 if (resource.exists()) {
62
63 resource.delete();
64 }
65 } catch (Exception e2) {
66
67 errWithStackTrace(e2);
68 }
69 continue;
70 }
71 } catch (Exception e) {
72
73 errWithStackTrace(e);
74 }
75 break;
76 }
77 splash.close();
78 }
79
80 public GUIMain gui;
81 public ListenPortManager listenPortManager;

Callers

nothing calls this directly

Calls 11

supportedJavaMethod · 0.95
getMethod · 0.95
showMethod · 0.95
startMethod · 0.95
getInstanceMethod · 0.95
closeMethod · 0.95
getDatabasePathMethod · 0.80
existsMethod · 0.80
errWithStackTraceMethod · 0.80
toStringMethod · 0.45
deleteMethod · 0.45

Tested by

no test coverage detected