import gnu.getopt.Getopt;
public class Main {
public static void main(String[] args) {
Getopt getopt = new Getopt("Main", args, "o:h");
int c;
String output = "";
while ((c = getopt.getopt()) != -1) {
switch (c) {
case 'o':
output = getopt.getOptarg();
break;
case 'h':
printHelp();
System.exit(0);
break;
default:
printHelp();
System.exit(1);
break;
}
}
}
private static void printHelp() {
System.out.println("Usage: java Main -o <output>");
System.out.println("Options:");
}
}
java Main -o /path/to/output.txt