Search in sources :

Example 1 with DisUnityRoot

use of info.ata4.disunity.cli.command.DisUnityRoot in project disunity by ata4.

the class DisUnityCli method main.

/**
     * @param args the command line arguments
     */
public static void main(String[] args) {
    LogUtils.configure();
    try (PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out), true)) {
        JCommander jc = new JCommander();
        DisUnityRoot root = new DisUnityRoot();
        root.init(jc, out);
        jc.setProgramName(DisUnity.getProgramName());
        jc.addObject(root);
        jc.parse(args);
        root.run();
    } catch (ParameterException ex) {
        L.log(Level.WARNING, "Parameter error: {0}", ex.getMessage());
    } catch (Throwable t) {
        L.log(Level.SEVERE, "Fatal error", t);
    }
}
Also used : JCommander(com.beust.jcommander.JCommander) OutputStreamWriter(java.io.OutputStreamWriter) ParameterException(com.beust.jcommander.ParameterException) DisUnityRoot(info.ata4.disunity.cli.command.DisUnityRoot) PrintWriter(java.io.PrintWriter)

Aggregations

JCommander (com.beust.jcommander.JCommander)1 ParameterException (com.beust.jcommander.ParameterException)1 DisUnityRoot (info.ata4.disunity.cli.command.DisUnityRoot)1 OutputStreamWriter (java.io.OutputStreamWriter)1 PrintWriter (java.io.PrintWriter)1