hi!
I have just installed oracle 9i (Oracle9i Enterprise Edition Release 9.2.0.1.0 ) and set the classPath as follows
D:\oracle\ora92\jdbc\lib\ojdbc14.jar;D:\oracle\ora92\jdbc\lib\classes12.jar;
as i have installed it in D:\oracle
what is the problem ? The probem is this, i am not able to execute the following program !!
import java.sql.*;
class Demo
{
public static void main(
String []args) throws SQLException,ClassNotFoundException
{
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con = DriverManager.getConnection ("jdbc:oracle:thin:@localhost:1521:orcl","scott","tiger");
System.out.println("Connection established successfully...");
}
}
I am getting the errors something like this !! C:\Documents and Settings\sukhdevzcomputer\mypgms\jdbc>
java Demo
Exception in
thread "main" java.lang.UnsupportedClassVersionError: Demo (Unsuppo
rted major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
The pgm is compiled but while i am trying to execute the program, i am getting these errors( above mentioned).
so can you help me !!