🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Environment Variable

#17009
From: Alexander Anguiano
Date: Sat, 26 Dec 1998 00:00
101 lines
4007 bytes
This is a multi-part message in MIME format.

------=_NextPart_000_0086_01BE30CE.57348AD0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello

I have nevered tried this but,  how about using the runtime class =
something like:

 Runtime r =3D Runtime.getRuntime();
 Process p =3D r.exec("echo $var1");
 InputStream in =3D p.getInputStream();
 String line;
 DataInputStream input =3D new DataInputStream(in);
 while ((line =3D input.readLine()) !=3D null) {
    jTextArea1.append(line + '\n');;
 }
 input.close();

 Alexander Anguiano
 Matrix Computing, Inc
 www.matrixcomputing.com

    Arumugam wrote in message <36848F16.7C03E5BA@kbo.mss.co.jp>...
    Hi,=20
       Can anyone tell me how to read and write the environment variable =
in JAVA.=20
       Is there any class available.?=20
       Can I know the function name.?=20
       Thanks in advance=20

       with Regards=20

       Arumugam=20

--=20
B. Arumugam
Mitsubishi Space Software, JAPAN.=20
Phone ; +81-467-47-6708
E-Mail : arumugam@kbo.mss.co.jp
     =20

------=_NextPart_000_0086_01BE30CE.57348AD0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.72.3509.100"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#000000 size=3D2>Hello</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>I have nevered tried this but,&nbsp; =
how about=20
using the runtime class something like:</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>&nbsp;Runtime r =3D=20
Runtime.getRuntime();<BR>&nbsp;Process p =3D r.exec(&quot;echo=20
$var1&quot;);<BR>&nbsp;InputStream in =3D =
p.getInputStream();<BR>&nbsp;String=20
line;<BR>&nbsp;DataInputStream input =3D new =
DataInputStream(in);<BR>&nbsp;while=20
((line =3D input.readLine()) !=3D null) {<BR>&nbsp;&nbsp;&nbsp;=20
jTextArea1.append(line + =
'\n');;<BR>&nbsp;}<BR>&nbsp;input.close();</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>&nbsp;Alexander =
Anguiano<BR>&nbsp;Matrix=20
Computing, Inc<BR>&nbsp;<A=20
href=3D"http://www.matrixcomputing">www.matrixcomputing</A>.com</FONT></D=
IV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 solid 2px; MARGIN-LEFT: 5px; PADDING-LEFT: =
5px">
    <DIV>Arumugam<ARUMUGAM@KBO.MSS.CO.JP> wrote in message &lt;<A=20
    =
href=3D"mailto:36848F16.7C03E5BA@kbo.mss.co.jp">36848F16.7C03E5BA@kbo.mss=
.co.jp</A>&gt;...</DIV>Hi,=20
    <BR>&nbsp;&nbsp; Can anyone tell me how to read and write the =
environment=20
    variable in JAVA. <BR>&nbsp;&nbsp; Is there any class available.?=20
    <BR>&nbsp;&nbsp; Can I know the function name.?=20
    <P>&nbsp;&nbsp; Thanks in advance=20
    <P>&nbsp;&nbsp; with Regards=20
    <P>&nbsp;&nbsp; Arumugam <PRE>--&nbsp;
B. Arumugam
Mitsubishi Space Software, JAPAN.&nbsp;
Phone ; +81-467-47-6708
E-Mail : arumugam@kbo.mss.co.jp</PRE>&nbsp; </BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0086_01BE30CE.57348AD0--
Technical Details
Message-ID: <763k1t$h0i@bgtnsc03.worldnet.att.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <36848F16.7C03E5BA@kbo.mss.co.jp>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,7fa13fd8250143d6
X-Google-Attributes: gidf74b3,public
From: "Alexander Anguiano" <alexandera@matrixcomputing.com>
Subject: Re: Environment Variable
Date: 1998/12/26
Message-ID: <763k1t$h0i@bgtnsc03.worldnet.att.net>
X-Deja-AN: 426003814
References: <36848F16.7C03E5BA@kbo.mss.co.jp>
Content-Type: multipart/alternative; boundary="----=_NextPart_000_0086_01BE30CE.57348AD0"
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Organization: AT&T WorldNet Services
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language