Solved

java error

Posted on 2007-04-09
3
224 Views
Last Modified: 2010-03-31
I have the follwing error

C:\classes>javac -classpath . com\psol\xbe2\MySAXApp2.java
com\psol\xbe2\MySAXApp2.java:11: package oracle.jdbc does not exist
import oracle.jdbc.OraclePreparedStatement;
                   ^
com\psol\xbe2\MySAXApp2.java:57: 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.io.*;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;

// Oracle JDBC imports.
import oracle.jdbc.OraclePreparedStatement;
0
Comment
Question by:fm134
3 Comments
 
LVL 10

Accepted Solution

by:
Jaax earned 400 total points
Comment Utility
You need to specify classes12.jar in your classpath
javac -classpath .;PathOfClasses12\classes12.jar  com\psol\xbe2\MySAXApp2.java
0
 
LVL 8

Assisted Solution

by:mnrz
mnrz earned 100 total points
Comment Utility
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
0
 

Author Comment

by:fm134
Comment Utility
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
 com\psol\xbe2\MySAXApp2.java

hi mnrz
I tried to move classes12.jar to same  path com\psol\xbe but did not work!!
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
java continue statement 10 71
array220 challenge 8 44
@SBGen Method 3 25
eclipse formatting 6 38
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now