Ravi Prakash schrieb:
> I have to capture the value of the user environment variable and
> manipulate the value of AA in the swing programs.
>
> I am trying to use System.getProperty("AA"); it is returning null bcos
> it give only the information for system variable not user defined
> variable
I though, that environment variables where considered
as legacy in JDK 1.1. Quoting from
java.lang.System#getenv(String name)
Deprecated. The preferred way to extract system-dependent information is
the system properties of the java.lang.System.getProperty methods
and the corresponding getTypeName methods of the Boolean, Integer, and
Long primitive types. For example:
String classPath = System.getProperty("java.class.path",".");
if (Boolean.getBoolean("myapp.exper.mode"))
enableExpertCommands();
-----
Anyway, there is no method to set environment variables. What you'll
have to do is calling an external programm or creating a native library
which reads and writes the environment variables for you.
--
Christian Pesch - Software Engineer
[EMAIL PROTECTED] - fon +49.40.325587.505 fax .999
CoreMedia AG - www.coremedia.com - 0700-COREMEDIA
Düsternstraße 3, 20355 Hamburg, Germany
CoreMedia - Think ahead! We're there.
_______________________________________________
Swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/swing