Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java and ORACLE XE connectivity Problem

 
pinga kanave
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have installed ORACLE XE in my linux server.

I m not able to execute JDBCVersion.java program which is just a test program to connect with database.

I m able to compile the program but while running it is giving following error.









My PATH Variable contains the following :
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/jdbc/lib/ojdbc14.jar:/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/jlib/orai18n.jar

Some information that might be useful.







 
Jan Cumps
Bartender
Posts: 2584
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you try to add the current folder into your classpath:
e.g.:
$ java -cp . JDBCVer.....
 
pinga kanave
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jan Cumps wrote:Can you try to add the current folder into your classpath:
e.g.:
$ java -cp . JDBCVer.....


I have tried it but still not working.
It gives me the list of options available with java.
 
Jan Cumps
Bartender
Posts: 2584
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java -cp .:<classpath to your Oracle XE jdbc driver> JDBCVersion
 
pinga kanave
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jan Cumps wrote:java -cp .:<classpath to your Oracle XE jdbc driver> JDBCVersion

Thanks , I used following command to run my program.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic