0

I'm trying to run a java process via Powershell in Windows XP. Here's the command:

java.exe -cp .;./common.jar -Dcontext=atest1 -Dresourcepath=. DW_Install

So, the classpath is . and .\common.jar (I think java takes the wrong slashes, right?) There are two environment variables, one "atest1" the other "." and the class to execute main on is DW_Install (in the default package).

This command works in cmd.exe, but doesn't is PS. What's going on? What is PS doing while parsing this command that CMD doesn't do (or vice versa)?

Aaron

2 Answers 2

0

It is powershell interpreting the args, so you will use windows style slashes.

Also, please check your history before referring to them as 'wrong'.

1
  • Thanks for the answer. Although PS has to read the args and do some processing of them, Java.exe will be the one to parse whatever goes through PS, right? Specifically, I don't think PS will parse "./common.jar" as a path, right? Of course it will interpret the argument (and get rid of quotes, etc.), but it doesn't know to expect a path there. I was feigning ignorance about the 'wrong slashes', but thanks for the correction nonetheless. Commented Jan 18, 2011 at 16:02
0

So, the answer is here. Thanks for your help. I hope this helps someone in the future!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .