Skip to content

Instantly share code, notes, and snippets.

@evacchi
Created July 2, 2020 07:22
Show Gist options
  • Save evacchi/15605c5d09a593a650849f29c2789216 to your computer and use it in GitHub Desktop.
Save evacchi/15605c5d09a593a650849f29c2789216 to your computer and use it in GitHub Desktop.
Fancy Java Main
package com.mycompany.app;
public class Main extends Application {{
System.out.println("Hello");
}}
abstract class Application {
public static void main(String... args) throws Exception {
Class.forName(System.getProperty("sun.java.command"))
.getConstructor().newInstance();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment