When I run a program from a JAR file (with java -jar) can I pass it command-line arguments?

John Zukowski

Execution of a class directly from a JAR file is just like running the program from the current working directory, without even extracting the files. This means that yes, you can pass in command-line arguments.