Property to property in command line?

I need to set an already set property at the command line to a new property.

Is it possible to do something iike:

java -Dmy.prop=user.dir MyApp

I can't set it up within java code because this property is used before by a 3rd party application.

I've tried

java -Dmy.prop=${user.dir} MyApp

but my.prop

gets the value ${user.dir}

[483 byte] By [balpoxa] at [2007-11-27 0:05:51]
# 1

>I need to set an already set property at the command line to a new property.

As stated no.

If you are setting the property yourself then you can just pass it in twice.

>

> I can't set it up within java code because this

> property is used before by a 3rd party application.

Why is that a problem?

Until classes are accessed the VM doesn't load them. So as long as you don't access any of those classes before you set a property in code that isn't a problem.

jschella at 2007-7-11 16:02:35 > top of Java-index,Java HotSpot Virtual Machine,Specifications...