Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: PATH in java

RE: PATH in java

From: Borrill, Christopher <Chris.Borrill_at_hp.com>
Date: Fri, 20 Oct 2006 09:23:22 +1300
Message-ID: <94941EE84F6FCD43B55C5B64DD0DAC6A0406B83B@nzmexc01.asiapacific.cpqcorp.net>


I believe you can also use the version of the exec function which takes an String[] envp argument and supply the PATH in this:

http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html#exec

Chris

-----Original Message-----

From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of John Dunn Sent: Friday, 20 October 2006 4:39 a.m.
To: 'oracle-l'
Subject: PATH in java

I am using rt.exec in a java stored procedure to run OScommands(Unix commands and scripts from java), however the PATH does not seem to be set, so I have to specify the full path of the command I want to run (e.g.
/usr/bin/lp).
How can I set the PATH so that I do not need to specify the full path of the command?
Platform is Oracle 10.2 on various unix platforms

John

--

http://www.freelists.org/webpage/oracle-l

--

http://www.freelists.org/webpage/oracle-l Received on Thu Oct 19 2006 - 15:23:22 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US