I think system properties (-D) should have higher priority than environment variables. Think of it this way: environment variables are applicable to all processes running on the OS, but system properties can override them for a specific JVM process.