Article View: borland.public.jbuilder.java.language
Article #587Re: Put a value to system variables
From: David Orriss, Jr. [TeamB]
Date: Wed, 16 Mar 2005 17:19
Date: Wed, 16 Mar 2005 17:19
41 lines
2469 bytes
2469 bytes
On Wed, 16 Mar 2005 11:22:29 +0200, tolis wrote: > 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 When you start the application you can say: java -Dofficevar=$VARIABLE Where VARIABLE is the name of your system variable that you defined the way you described above and you can retrieve the value in the Java code using System.getProperty(). HTH Yasou.. -- David Orriss Jr. TeamB http://www.davenet.net/ * Please limit all responses to the newsgroups. Thanks! * Got a JBuilder website? Join the JBuilder Netring! Check out http://www.davenet.net/jbwebring/jbwebring.htm for more information! My blog: http://mywebpages.comcast.net/daorriss/ Save yourself some time and check these sites: Borland Newsgroup Search: http://www.borland.com/newsgroups/ngsearch.html Joi Ellis's Faq-O-Matic: http://www.visi.com/~gyles19/fom-serve/cache/1.html
Technical Details
Message-ID:
<1c4jz4647q64a$.dlg@news.davenet.net>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!feeder2.on.meganewsservers.com!meganewsservers.com!textfeed1.on.meganewsservers.com!38.119.100.83.MISMATCH!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<4236f276@newsgroups.borland.com> <xn0dzsj2u6osrdy003@newsgroups.borland.com> <4237faae@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: "David Orriss, Jr. [TeamB]" <jbuilder_man@davenet.net> Subject: Re: Put a value to system variables Newsgroups: borland.public.jbuilder.java.language User-Agent: 40tude_Dialog/2.0.15.1 (ba841211.230.257) MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit References: <4236f276@newsgroups.borland.com> <xn0dzsj2u6osrdy003@newsgroups.borland.com> <4237faae@newsgroups.borland.com> Date: Wed, 16 Mar 2005 09:19:33 -0800 Message-ID: <1c4jz4647q64a$.dlg@news.davenet.net> X-Face: "huzh55Xi]!ZNni78>a*5+).`SK?<^q2MlHk-C]Z2M9T@\J5ZCB$95Ey+s"XQuhGFA[eutZ :0^AV!Q;t>gE`1-=8d;HZ6~*o1dH<X9\b$!|(}+I'!Xq)@3Op}%0ArW&nf'Qh*EwR NNTP-Posting-Host: 67.136.0.92 X-Trace: newsgroups.borland.com 1110993571 67.136.0.92 (16 Mar 2005 09:19:31 -0800) Lines: 41 X-Authenticated-User: daorriss Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!feeder2.on.meganewsservers.com!meganewsservers.com!textfeed1.on.meganewsservers.com!38.119.100.83.MISMATCH!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail