Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Environment Variables with java

Reply
Thread Tools

Environment Variables with java

 
 
Ruppen Pascal
Guest
Posts: n/a
 
      10-21-2003
Hello

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

Thx pascal


 
Reply With Quote
 
 
 
 
Christian Zimmermann
Guest
Posts: n/a
 
      10-21-2003
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
>
>



 
Reply With Quote
 
 
 
 
Michael Borgwardt
Guest
Posts: n/a
 
      10-21-2003
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.

 
Reply With Quote
 
Mike Schilling
Guest
Posts: n/a
 
      10-21-2003
"Michael Borgwardt" <> wrote in message
news:bn3d7d$s3e17$...
> 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.


 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      10-21-2003
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.
 
Reply With Quote
 
Neal Gafter
Guest
Posts: n/a
 
      10-22-2003
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
>
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting environment variables from java Karim Java 3 06-01-2007 04:24 PM
Setting environment variables from java Karim Java 1 05-31-2007 03:45 PM
Setting environment variables from java Karim Java 0 05-31-2007 02:34 PM
How to access java environment variables from C++ application Amrita Java 1 06-02-2006 12:56 PM
problem with setting Java environment variables in Linux Leo Java 2 03-21-2006 04:49 PM



Advertisments