(String[] args)
| 31 | public 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; |
nothing calls this directly
no test coverage detected