Is There A Jvm Command-line Option To Change Directory?
In short, I want to know, is there a JVM command-line option to change the starting working directory? If it's important, I'm running jdk1.6.0_24. Background: I am using a tool ca
Solution 1:
In Java SE, the "current directory" is put into the system property user.dir
.
Manually override this value using a -D option might work:
java -Duser.dir=/some/directory ....
But I don't know if this also applies to the JVM used in Android
Solution 2:
"Current working directory" is an OS concept, not a JVM one, so you'll need to find a solution at that level, such as writing a batch or shell script.
Solution 3:
I would look into running the robolectric tests within a Maven build. That makes it way easier to run the tests. Within Eclipse as well. And there is probably infinitest support for Maven as well.
Post a Comment for "Is There A Jvm Command-line Option To Change Directory?"