Solved

java error

Posted on 2007-04-09
3
232 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
ID: 18875223
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
ID: 18875224
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
ID: 18877097
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Is there a simpler dropbox system? 10 44
Selenium docs api java index 3 64
java mysql insert application 14 41
Github api to fetch the number of collaborators in a git repo 1 25
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

713 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