• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Class not found Exception?

 
Ranch Hand
Posts: 221
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have copied connector jar file to the jdk1.5\jre\lib\ext folder
 
Bartender
Posts: 4116
72
Mac TypeScript Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

harilal ithikkat wrote:I have copied connector jar file to the jdk1.5\jre\lib\ext folder



That's a not a good thing to do. You should not place external jars under JDK. You can have different location for those jars. For your question, as you topic suggest program is unable to find the class (may be the driver implementation). Try placing the jar in different location and set the CLASSPATH system variable pointing to that jar (in addition to what it currently pointing to) and run your code then see what happens, if that doesn't work provide more details about your code etc..
 
harilal ithikkat
Ranch Hand
Posts: 221
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
my code is working in my system(Linux).
showing this problem when i moved to Windows.
 
Vijitha Kumara
Bartender
Posts: 4116
72
Mac TypeScript Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

harilal ithikkat wrote:my code is working in my system(Linux).
showing this problem when i moved to Windows.



Do you know how to set the classpath system variable in windows? Or try setting it at the time you run JVM like :

java -classapth "Your path to the jar file & the class file/any other class files your program uses" NameOftheClassFile.

See what happens.
 
harilal ithikkat
Ranch Hand
Posts: 221
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Vijitha Kumara,
i will try that
 
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There's a nice FAQ entry about setting the classpath.
http://faq.javaranch.com/java/HowToSetTheClasspath
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic