PDA

View Full Version : Help: Adding property to Global property list



akrishna
07-18-2002, 01:23 PM
Hi,

Can I add my own property to the Global (-G) property list?

I would like to add some thing like

-G dialog.backgroundColor=yellow

for all message dialogs.

When I do this, I get the error message

Error processing argument to G: Expected = at offset 18

thanks
Kris

Jeff Dillon
07-19-2002, 09:01 AM
Is dialog.backgroundColor your own custom property?

Java System Properties are the easiest way to get global properties. You can refer to any system property with $J(myproperty) and you can set them on the command line like...

java -Dmyproperty=test -jar setup.jar

akrishna
07-19-2002, 11:51 AM
If I use Java properties, then I cannot use them in the response file.

The idea is to set values to the custom properties in a response file, without introducing a new String resolver.

thanks
Kris

Jeff Dillon
07-19-2002, 11:53 AM
You can create a file named...

<nameOfYourLauncher>.sp

and put your system properties in there. This file automatically gets read when you run with the launcher.

(.sp stands for system properties)

akrishna
07-19-2002, 12:21 PM
Then that would involve shipping (and maintaining) 2 files., response file and system property file. :(

Is it possible to set the values for a custom property only in the response file, without introducing another resolver?

thanks
Kris

Jeff Dillon
07-19-2002, 12:23 PM
You could set the system properties in the launcher's Java Arguments property if you don't want the file.