Article View: borland.public.jbuilder.java.language
Article #17009Re: Environment Variable
From: Alexander Anguiano
Date: Sat, 26 Dec 1998 00:00
Date: Sat, 26 Dec 1998 00:00
101 lines
4007 bytes
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> </DIV>
<DIV><FONT color=3D#000000 size=3D2>I have nevered tried this but, =
how about=20
using the runtime class something like:</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT color=3D#000000 size=3D2> Runtime r =3D=20
Runtime.getRuntime();<BR> Process p =3D r.exec("echo=20
$var1");<BR> InputStream in =3D =
p.getInputStream();<BR> String=20
line;<BR> DataInputStream input =3D new =
DataInputStream(in);<BR> while=20
((line =3D input.readLine()) !=3D null) {<BR> =20
jTextArea1.append(line + =
'\n');;<BR> }<BR> input.close();</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT color=3D#000000 size=3D2> Alexander =
Anguiano<BR> Matrix=20
Computing, Inc<BR> <A=20
href=3D"http://www.matrixcomputing">www.matrixcomputing</A>.com</FONT></D=
IV>
<DIV><FONT color=3D#000000 size=3D2></FONT> </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 <<A=20
=
href=3D"mailto:36848F16.7C03E5BA@kbo.mss.co.jp">36848F16.7C03E5BA@kbo.mss=
.co.jp</A>>...</DIV>Hi,=20
<BR> Can anyone tell me how to read and write the =
environment=20
variable in JAVA. <BR> Is there any class available.?=20
<BR> Can I know the function name.?=20
<P> Thanks in advance=20
<P> with Regards=20
<P> Arumugam <PRE>--
B. Arumugam
Mitsubishi Space Software, JAPAN.
Phone ; +81-467-47-6708
E-Mail : arumugam@kbo.mss.co.jp</PRE> </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-mailReferences:
<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