Hello All,
I would like to ask one question on
Java. I am extremely new in Java and I need help. I want to display data from my database which is Oracle. My code looks like this:
At first, I set the System SDN as Ora10g and all my data from the database can be obtained through the command prompt. But, I don't know what happen now, suddenly the System SDN, even I have entered the data source name a few times, it still shows blank (empty). When I googled, I need some rights to enter System SDN. Unfortunately, I'm using AD ID and will not get the rights to what I want.
So, I tried to set the classpath for the driver manually by typing into the command prompt
"javac -classpath=C:\oracle\product\10.2.0\client_5\jdbc\lib\ojdbc14.jar tryout.java"
while compiling and it compiled successfully.
But, whenever I try to run by typing at the command prompt "java -cp . tryout" I will get "Could not find the database driver" which is from my Exception.
Why is this happening? Why is my program straight away go to exception wherelse I have set the classpath.
I hope people here will help me because I have searched halfway around the world and still could'nt find the solution.
Thanks in advance.