I know this is a trivial question, but I could not find the answer on the internet.
I am trying to run a Java class with the main
function with program
Arguments passed before the .jar file will be arguments to the JVM, where as arguments passed after the jar file will be passed on to the user's program.
bin/spark-submit --class classname -Xms256m -Xmx1g something.jar someargument
Here, s
will equal someargument
, whereas the -Xms -Xmx
is passed into the JVM.
public static void main(String[] args) {
String s = args[0];
}