This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I am using windows 2000 server with Eclipse.
In the dost prompt, I ran the file run_sqlldrTest2.cmd and it loaded record into the Oracle database.
I tried to do the same thing in java calling the run_sqlldrTest2.cmd. In java it states the "The command line job - -executed successfully."
However, I donot see the record being loaded into the database.
What am I doing wrong?
If I comment out the "cmd=set PATH=C:\\OraHome_1\\bin;" line and ran RunCmd.java, on the line for P.waitFor() it would freeze there forever:
Any help for suggestions would be greatly appreciated!!
You should read the JavaWorld article "When Runtime.exec() won't" first. That could solve the freezing.
Also, there is no need to set the PATH in the command itself; Runtime.exec() is overloaded, and with some of these overloaded methods you can set environment variables. It clears all other environment variables though, but if these do not matter then that's not a problem.