Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8889665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T22:19:00+00:00 2026-06-14T22:19:00+00:00

After installing Oracle 11g R2 on my system, I set the environment variable as

  • 0

After installing Oracle 11g R2 on my system, I set the environment variable as following:

variable Name :CLASSPATH 
variable Value :E:\app\JamesPJ\product\11.2.0\dbhome_1\jdbc\lib\ojdbc6.jar
Variable name : ORACLE_HOME
varaible value :E:\app\JamesPJ\product\11.2.0\dbhome_1\jdbc\lib\ojdbc6.jar

When I run the program using testpad and in command prompt the error comes as follows :

Error: Could not find or load main class test

How is this caused and how can I solve it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T22:19:01+00:00Added an answer on June 14, 2026 at 10:19 pm

    Java looks in the classpath for all classes. You’ve however set the classpath to a single fixed JAR file which is the JDBC driver itself. This JAR file surely doesn’t contain your own test.class file. Provided that your test.class is available in the current working directory, you should have added the current working directory . to the classpath.

    .;E:\app\JamesPJ\product\11.2.0\dbhome_1\jdbc\lib\ojdbc6.jar
    

    Note that the paths in the classpath are semi colon separated in Windows and colon separated in *nix.

    Alternatively, you could also just control the classpath during execution by the -cp argument. This way the environment variable will be ignored altogether.

    java -cp .;E:\app\JamesPJ\product\11.2.0\dbhome_1\jdbc\lib\ojdbc6.jar test
    

    To avoid the tedious work of re-entering the whole command everytime, put it in a .bat or .cmd file and execute it instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After installing the Resque gem and running a worker my app now produces an
After installing Rails with rvm, I was faced with the following error: /afs/andrew.cmu.edu/usr11/kvudata/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/yaml.rb:56:in '<top
After installing the Java for OS X 2012-006 update, the Java Preferences app, for
After installing Snow Leopard I got the following error when connecting to a remote
After installing collective.solr via buildout, I am getting the following error when attempting to
After installing Oracle XE DB and ODP.NET, i tried to run included scripts to
After installing the package, I enter the python environment. I am new to python
After installing Oracle XE, something in Oracle is listening on port 8080. I am
After installing VMware Server I get the following error when I try to access
After installing VB6, when I open the VB6 editor, it is showing the following

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.