Results 1 to 4 of 4
  1. #1
    Bahirji Naik is offline Member
    Join Date
    Dec 2011
    Posts
    5
    Rep Power
    0

    Post java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver

    I know this may be old error but I try lots..plz help

    I create one database applet and compiled-run in eclipse it worked nice now I want to run in 'appletviewer' but it showing an error 'java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver'

    I write classpath as 'set classpath=<source> ' also set classes in classpath.

    my current class path is as :

    C:\>echo %classpath%
    c:\tree\pacg;.;c:\tree\pacg\ojdbc14.jar;c\tree\pac g\classes12.jar

    and I put manifest file in jar as :

    Manifest-Version: 1.0

    Name: tree/pacg/
    Sealed: true

    when I run :

    C:\>appletviewer tree\pacg\DrawApplet.html
    Connection Call
    Error e java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver

    I also added all classes, database driver, html files in classpath

    please help..
    Last edited by Bahirji Naik; 12-21-2011 at 03:22 PM.

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,014
    Rep Power
    20

    Default Re: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver

    Do not set your classpath like that.
    It should be defined in the applet tag.
    That's the only place (as far as I am aware) that it will draw for the location of dependent jar files.

  3. #3
    Bahirji Naik is offline Member
    Join Date
    Dec 2011
    Posts
    5
    Rep Power
    0

    Default Re: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver

    When I set my applet code as follows, its running. But is it correct? I means can we put oracle driver file in archive attribute?

    <applet code=tree.pacg.DrawApplet.class codebase=c:\tree\pacg archive=DrawApplet.jar,ojdbc14.jar height="800" width="1000">
    </applet>
    Last edited by Bahirji Naik; 12-22-2011 at 06:35 AM.

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,014
    Rep Power
    20

    Default Re: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver

    As far as I'm aware that's the correct way to do it.
    It's the applet equivalent of the Manifest in an executable jar file.

Similar Threads

  1. Replies: 10
    Last Post: 03-20-2012, 08:23 AM
  2. Replies: 6
    Last Post: 02-19-2010, 01:57 PM
  3. java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
    By kishan.java in forum JavaServer Pages (JSP) and JSTL
    Replies: 3
    Last Post: 10-19-2009, 05:34 PM
  4. Replies: 0
    Last Post: 03-21-2008, 01:13 PM
  5. Replies: 1
    Last Post: 03-14-2008, 02:51 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •