🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Put a value to system variables

#585
From: tolis
Date: Wed, 16 Mar 2005 09:22
39 lines
2428 bytes
"John McGrath [TeamB]" <ng-b@JPMcGrath.net> wrote in message
news:xn0dzsj2u6osrdy003@newsgroups.borland.com...
> On 3/15/2005 at 9:35:23 AM, tolis wrote:
>
> > I' d like to ask , how can i put a value e.g. 'C:\Program
Files\Microsoft
> > Office\Office'
> > into System Variable using Java.
>
> What do you mean by "System Variable"?  If you are talking about defining
> a variable externally and then accessing it from your Java code, you can
> use a System Property.  With many Java launchers, you can define a system
> property on the command line using an option line -Dproperty=value, and
> you can retrieve the value in the Java code using System.getProperty().
>
> With Java 1.5, you can also get the value of an environment variable with
> System.getenv(), although support for this is system dependent.
>
> -- 
> Regards,
>
> John McGrath [TeamB]
>
> ---------------------------------------------------
> Before sending me e-mail, please read:
>     http://www.JPMcGrath.net/newsgroups/e-mail.html


Hello,
I mean that i want to write(add, give) from my java code a value e.g.
'C:\Program Files\Microsoft Office\Office'
into System Variable of window(Path) (start-->control
panel-->System-->Advanced-->Enviroment Variables-->System
Variables-->(Variable = Path and value = 'C:\Program Files\Microsoft
Office\Office' )

Thanks in Advance.
Apostolis
Hatziyannis
Technical Details
Message-ID: <4237faae@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!pd7cy2so!shaw.ca!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!news-in.nuthinbutnews.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <4236f276@newsgroups.borland.com> <xn0dzsj2u6osrdy003@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: f74b3,f391e0283c1eb2c9
X-Google-Attributes: gidf74b3,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "tolis" <apostolish@orbis.gr>
Newsgroups: borland.public.jbuilder.java.language
References: <4236f276@newsgroups.borland.com> <xn0dzsj2u6osrdy003@newsgroups.borland.com>
Subject: Re: Put a value to system variables
Date: Wed, 16 Mar 2005 11:22:29 +0200
Lines: 41
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 193.92.231.142
Message-ID: <4237faae@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1110964910 193.92.231.142 (16 Mar 2005 01:21:50 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!pd7cy2so!shaw.ca!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!news-in.nuthinbutnews.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail