MCPcopy Create free account
hub / github.com/TrsstProject/trsst / main

Method main

src/main/java/com/trsst/ui/AppMain.java:51–95  ·  view source on GitHub ↗
(String[] argv)

Source from the content-addressed store, hash-verified

49 private static String serviceUrl;
50
51 public static void main(String[] argv) {
52
53 if (argv.length > 0) {
54 serviceUrl = argv[0];
55 }
56
57 // register osx-native event handlers if needed
58 try {
59 // NOTE: must happen first to collect launch events
60 appleEvents = new AppleEvents();
61 // major improvement in font rendering on OSX
62 //System.setProperty("prism.lcdtext", "false");
63 } catch (Throwable t) {
64 // probably wrong platform: ignore
65 log.warn("Could not load osx events: " + t.getMessage());
66 }
67
68 if (System.getProperty("com.trsst.server.relays") == null) {
69 // if unspecified, default relay to home.trsst.com
70 System.setProperty("com.trsst.server.relays",
71 "https://home.trsst.com/feed");
72 }
73
74 try {
75 // write to log file if configured
76 String path = System.getProperty("com.trsst.logfile");
77 if (path != null) {
78 Handler handler = new FileHandler(path, 1024 * 1024, 3);
79 Logger.getLogger("").addHandler(handler);
80 log.info("Writing log file to: " + path);
81 }
82 } catch (SecurityException e) {
83 log.warn("No permission to write to log file", e);
84 } catch (IOException e) {
85 log.warn("Can't write to log file", e);
86 }
87
88 // we connect with our local server with a self-signed certificate:
89 // we create our server with a random port that would fail to bind
90 // if there were a mitm that happened to be serving on that port.
91 Common.enableAnonymousSSL();
92
93 // launch the app
94 launch(argv);
95 }
96
97 public static AppMain instance;
98

Callers 1

doServeMethod · 0.95

Calls 1

enableAnonymousSSLMethod · 0.95

Tested by

no test coverage detected