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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Oralce exp doesn't work with Java runtime

Re: Oralce exp doesn't work with Java runtime

From: <tzvika.barenholz_at_gmail.com>
Date: 13 May 2007 06:33:46 -0700
Message-ID: <1179063226.587151.277590@e51g2000hsg.googlegroups.com>


In Windows, sometimes it helps to append cmd /c to the exectuable you are running, i.e. to execute "cmd /c exp scott...."

T

On May 12, 4:48 pm, Boxer <jianni..._at_gmail.com> wrote:
> I was trying to run oracle exp through the java, code was like:
>
> ....
> Runtime runtime = Runtime.getRuntime();
> Process p = runtime.exec("exp scott/tiger File=scott.dmp TABLES=(scott.
> %)");
> p.waitFor(); //this line will make the p hang!!! p can exit normally
> without it.
> ...
>
> But the program hang there never get finished.
>
> I tried this:
>
> ....
> Runtime runtime = Runtime.getRuntime();
> Process p = runtime.exec("exp scott/tiger File=scott.dmp TABLES=(scott.
> %)");
> Thread.sleep(10000); //obviously p has exited after this
> System.out.println(""+p.exitValue());
> ...
> the last line throws an exception saying the process has not exit yet.
>
> The environment is Eclipse, Java 1.5, Junit
>
> But I didn't find such behavior with calling sqlplus this way. Any
> idea what make this EXP utility not working with java runtime?
>
> Thx
Received on Sun May 13 2007 - 08:33:46 CDT

Original text of this message

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