• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Using JDBC in applets

 
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I tried using the following statement in an applet and it gives a ClassNotFoundException:
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver")
Can somebody please explain to me why???
It seems like the applet cannot find the Sun's driver package.
Pleas help.
 
Ranch Hand
Posts: 625
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the driver referenced in your classpath?
 
Meng Tan
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem occured when I run the applet using IE.
How do u put the driver in the classpath during execution?
I thought the Sun's ODBC bridge driver is in JDK 's standard library.
Please advise.
 
Sean Casey
Ranch Hand
Posts: 625
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not using windows. I'm using linux, and the .jar that the driver is in needs to be directly referenced in my classpath.
 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Meng,
Assuming that you have the bridge already referenced in the classpath (Perhaps due to it being in the same directory as the standard java classes), then perhaps the problem you have is related to your attempts to use the applet on a network? The Sun bridge is a fairly simple type I driver, and as I understand it cannot be used on a network?
Cheers
Alan Watts
 
She said she got a brazillian. I think owning people is wrong. That is how I learned ... tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic