Hi
I was trying to execute a
java file from Unix. I am using a
JDBC connection in this program.
Code:
XXXXX/test/nirmal/Java > ls -lrt
drwxrwxrwx 3 ideasm10
ide 3 Jul 7 11:01 classes
drwxrwxrwx 3 ideasm10 ide 3 Jul 7 11:01 src
drwxrwxrwx 2 ideasm10 ide 3 Jul 7 11:47 lib
-rw-r--r-- 1 ideasm10 ide 71 Jul 7 13:01 sysout.log
From here I give the when I give the command
Code:
java -cp classes com/test/jdbc/InvalidNumberTest
I am getting java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver.
Then I placed the ojdbc14.jar in the lib abd then executed the command
Code:
java -cp classes;lib/ojdbc14.jar com/test/jdbc/InvalidNumberTest
Now I am getting the exception
Code:
Failed to load Main-Class manifest attribute from
lib/ojdbc14.jar.
Can some one please help me to execute the java file.
The same program can be executed from Windows using the same commnds.
Also can you please provide a .sh file wher I can set the classpaths and also execute the java program.
Thanks
Nirmal