Sam Rose wrote:
> I've tried this...
> but it doesn't like my source, probably because I need to return this
> value, i.e. hit the enter button after this, is there a bit of code
> that I can achieve this with?
>
> String command ="source /opt/bin/coraenv";
> String runsql = "sqlplus";
>
> Runtime runtime = Runtime.getRuntime();
> Process process = null;
> Process sql = null;
>
> try {
> process = runtime.exec(command);
> sql = runtime.exec(runsql);
> }//end try
>
> this brings up
>
> java.io.IOException: source: not found
>
"source" is not an executable command -- it is a C-Shell built in. What you
will probably need to do is build a single executable script that sets your
environment and executes SQL*Plus, and then make that your command.
What I can't figure out, though, is why anyone would go through all of this
instead of executing the SQL commands you need directly from Java, using a
JDBC driver.
Craig McClanahan
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html