Can you set the current running directory from the java command line?

command-line, java, working-directory

Solution

There is a JVM argument `-Duser.dir` which can be used to set working directory for JVM.

Problem

I am running a Java application from the command line. Can I specify a command line argument to set the current running directory to something other than where the application is actually going to run?

Original source

Related problems