Re: Reading Environment Variables



Brian Bagnall wrote:
...
I set up an environment variable in Windows called "NXTCOMM" and gave it a
value of "COM6". Now I'm trying to get my Java program to read the value.
....
It returns NULL when I run this program. Any ideas?

<http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html#getenv(java.lang.String>

[ though Google the groups for some potentially
important caveat's surrounding it's use - Sun
deprecated it for a while.. ]

Andrew T.

.



Relevant Pages

  • Re: how can I invoke a Java code?
    ... I searched the topic in Google and find maybe the ... better way is use GCJ to compile it. ... If you want to run the Java program as a separate process, ...
    (comp.lang.python)
  • Re: Searching on Googlewith Java
    ... > Dear Programmers, ... > I was trying to extract images automaticly from Google with an URL ... > request. ... > there is no connection between my Java Program and the requested page. ...
    (comp.lang.java.programmer)
  • Re: Searching on Googlewith Java
    ... > Dear Programmers, ... > I was trying to extract images automaticly from Google with an URL ... > request. ... > there is no connection between my Java Program and the requested page. ...
    (comp.lang.java.programmer)
  • Reading Environment Variables
    ... I set up an environment variable in Windows called "NXTCOMM" and gave it a ... value of "COM6". ... Now I'm trying to get my Java program to read the value. ...
    (comp.lang.java.help)
  • Re: How to use a DLL in java program
    ... that DLL.Is there any way to import a DLL in java program and how to ... Java-COM bridge (Google for one, ...
    (comp.lang.java.help)