java error

I have the follwing error

C:\classes>javac -classpath . com\psol\xbe2\
com\psol\xbe2\ package oracle.jdbc does not exist
import oracle.jdbc.OraclePreparedStatement;
com\psol\xbe2\ cannot resolve symbol
symbol  : class OraclePreparedStatement
location: class com.psol.xbe2.MySAXApp2
     OraclePreparedStatement pstmt = null;
2 errors
my java code heder:

package com.psol.xbe2;

// Java SQL imports.
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;

// Oracle JDBC imports.
import oracle.jdbc.OraclePreparedStatement;
Who is Participating?
JaaxConnect With a Mentor Commented:
You need to specify classes12.jar in your classpath
javac -classpath .;PathOfClasses12\classes12.jar  com\psol\xbe2\
mnrzConnect With a Mentor Commented:
You should place the jar file contains the oracle.jdbc.OraclePreparedStatement and other classes in the class path.

please tell us in which directory you run that command and where is the oracle's jar file
fm134Author Commented:
hi jaxx
thanks but the command was too long
C:\classes>javac -classpath C:\oracle\product\10.1.0\db_1\jdbc\lib\classes12.jar

hi mnrz
I tried to move classes12.jar to same  path com\psol\xbe but did not work!!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.