java -Dcn.env=ZaphodBeeblebrox MyClass
... is one way. See also System.setProperty(), which you could
use in a "launcher" class like
public class Launcher {
public static void main(String[] args) {
// Get a value -- this takes one from the
// environment, but you could get as fancy
// as you like here.
String value = System.getenv("CN_ENV");
// Set the property.
System.setProperty("cn.env", value);
// Run the "real" main() method.
MyClass.main(args);
}
}
--
Eric Sosman
eso...@comcast-dot-net.invalid