Tuesday, May 20, 2014

[JAVA] [CODE] How to Pass Parameter/Argument to JAR file

Here is what needs to be done if parameter/argument want to be passed to the JAR file:

public class Convert {
    public Convert() {
        super();
    }

    public static void main(String[] args) {
        try{
                String inputFile = args[0];
            }
            catch(Exception e) {
                e.printStackTrace();
            }
  }
}

No comments: