How to pass Properties to jar from Powershell?

Viewed 12970

I've been using Powershell-1.0 for command line needs for a while, instead of cmd.exe. Unfortunately, there are still some caveats when using Java. I need to pass a property to a jar, like that:

java -jar -Duser.language=en any.jar

This line works fine in cmd.exe, but not in Powershell as it searches for another jar:

Unable to access jarfile user.language=en

Using quotes doesn't help.

Is it doable in Powershell-1.0, or do I miss something in Java?

3 Answers
Related