views:

25

answers:

1

hello, i have many run configurations in eclipse to launch applets. i provide parameters to these applets via the parameters tab of the run configurations.

here i would like to add some global variables like ${playerid} like it can be done in the parameters section of normal applications. so if i change the value of playerid in the string substitution section of eclipse, all my applets will use the new value.

thanks!

+1  A: 

You can use the java Properties class to set the properties. You can also load the properties from an XML document and also store all the properties in an XML file.

The System class maintains the Properties object. You can access it as follows:

  System.getProperties();

But from the point of view of using it in applets there are some security considerations.

athena
thanks, and how can i make sure that all applets in my workspace use this one properties file?
clamp
@clamp: I have edited my answer to answer your comment.
athena