This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Services and the fly likes Execute sqlldr command from java code. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Execute sqlldr command from java code." Watch "Execute sqlldr command from java code." New topic
Author

Execute sqlldr command from java code.

Ritu Kapoor
Ranch Hand

Joined: Oct 03, 2004
Posts: 102
Hi,

I am not able to transfer the data from txt to oracle table using sqlldr. If I execute the same command from cmd, it executes fine but does not work if I execute from java code.

Please find the code below






Please help to resolve it.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
Process proc = rt.exec(cmd);

Executes one command line. You appear to have multiple commands you want to run. In that case, I would write a .bat file containing all of those commands and exec() the batch file.

You must also provide for consuming the stdOut and stdErr streams created by the process - see the Process JavaDocs.

Bill
 
wood burning stoves
 
subject: Execute sqlldr command from java code.
 
Similar Threads
Problem in unzipping a folder using java.util.zip API
Runtime.getRuntime().exec(commandToExecute) without promting for enter key to be pressed
who can my question about this code
run dos cammand in java code
Getting value of static variable with Reflection ?