add test code for running jar with arguments
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package com.baeldung.jarArguments;
|
||||
|
||||
public class JarExample {
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Hello Baeldung Reader in JarExample!");
|
||||
|
||||
if(args == null) {
|
||||
System.out.println("You have not provided any arguments!");
|
||||
}else {
|
||||
System.out.println("There are "+args.length+" argument(s)!");
|
||||
for(int i=0; i<args.length; i++) {
|
||||
System.out.println("Argument("+(i+1)+"):" + args[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
Main-Class: com.baeldung.jarArguments.JarExample
|
||||
Reference in New Issue
Block a user