🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #14487

Re: environment variables from within Java

#14487
From: Ricardo
Date: Fri, 03 Sep 1999 00:00
20 lines
1088 bytes
On Tue, 31 Aug 1999 16:03:34 -0400, "Kevin D" <kevind@saccapital.com>
wrote:

>Maybe this may have been addressed already but I can't find it.
>
>Is it possible to access the environment variables from within Java?
>Win NT, Win 95 or Unix
>
>If not, is the -D runtime parameter the work-around?
>
>Thanks for your assistance.

	You can use the method getenv of System class. It's now
deprecated by Java 1.2, but jbuilder still support it.
	It's a static method, so you can use it without declaring a
object of System class.
Here is a example:
str = System.getenv("PATH");
Ricardo Engel
e-mail: engel@linuxbr.com.br
Technical Details
Message-ID: <37cf87f9.7310762@forums.inprise.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7qhc70$aho9@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,1698c67948d2aa23
X-Google-Attributes: gidf74b3,public
From: engel@linuxbr.com.br (Ricardo)
Subject: Re: environment variables from within Java
Date: 1999/09/03
Message-ID: <37cf87f9.7310762@forums.inprise.com>
X-Deja-AN: 520535544
References: <7qhc70$aho9@forums.borland.com>
Organization: Another Netscape Collabra Server User
Newsgroups: borland.public.jbuilder.java.language