Environment Variables with java

Discussion in 'Java' started by Ruppen Pascal, Oct 21, 2003.

  1. Hello

    I search a solution where I can use environment variables with java. The
    method getenv(String) is deprecated???

    Thx pascal
     
    Ruppen Pascal, Oct 21, 2003
    #1
    1. Advertising

  2. Hello

    I think it's not possible !

    Greets

    "Ruppen Pascal" <> wrote in message
    news:3f95350a$...
    > Hello
    >
    > I search a solution where I can use environment variables with java. The
    > method getenv(String) is deprecated???
    >
    > Thx pascal
    >
    >
     
    Christian Zimmermann, Oct 21, 2003
    #2
    1. Advertising

  3. Ruppen Pascal wrote:
    > Hello
    >
    > I search a solution where I can use environment variables with java. The
    > method getenv(String) is deprecated???


    And with good reasons. Environment variables work quite differently
    on different operating systems. If you really need them, use Runtime.exec()
    to get the variables from the shell.
     
    Michael Borgwardt, Oct 21, 2003
    #3
  4. "Michael Borgwardt" <> wrote in message
    news:bn3d7d$s3e17$-berlin.de...
    > Ruppen Pascal wrote:
    > > Hello
    > >
    > > I search a solution where I can use environment variables with java. The
    > > method getenv(String) is deprecated???

    >
    > And with good reasons. Environment variables work quite differently
    > on different operating systems.


    As do files and threads; how foolish of Java to support *them*. An
    environment variable abstraction would actually be quite useful.

    One thing you can do is run your Java program from a shell script/batch
    file/etc. that generates -Dname=value flags for the relevant environment
    variables, turning them into system properties.
     
    Mike Schilling, Oct 21, 2003
    #4
  5. Ruppen Pascal

    Roedy Green Guest

    On Tue, 21 Oct 2003 15:30:41 +0200, "Ruppen Pascal"
    <> wrote or quoted :

    >I search a solution where I can use environment variables with java. The
    >method getenv(String) is deprecated???


    see http://mindprod.com/jgloss/environment.html

    --
    Canadian Mind Products, Roedy Green.
    Coaching, problem solving, economical contract programming.
    See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
     
    Roedy Green, Oct 21, 2003
    #5
  6. Ruppen Pascal

    Neal Gafter Guest

    Yes, we removed support for them in a previous release. Sorry. They'll be back
    in J2SE 1.5.0.

    Ruppen Pascal wrote:
    > Hello
    >
    > I search a solution where I can use environment variables with java. The
    > method getenv(String) is deprecated???
    >
    > Thx pascal
    >
    >
     
    Neal Gafter, Oct 22, 2003
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Leo
    Replies:
    2
    Views:
    3,001
    Gordon Beaton
    Mar 21, 2006
  2. Amrita
    Replies:
    1
    Views:
    442
    Gordon Beaton
    Jun 2, 2006
  3. Replies:
    5
    Views:
    660
  4. Karim
    Replies:
    0
    Views:
    2,360
    Karim
    May 31, 2007
  5. Karim
    Replies:
    1
    Views:
    1,292
    Robert Klemme
    May 31, 2007
Loading...

Share This Page