Results 1 to 5 of 5
  1. #1
    oregon is offline Member
    Join Date
    Jul 2007
    Posts
    41
    Rep Power
    0

    Default question about Class.forName()

    Can anyone explain me Class.forName() syntax ?
    This is used in jdbc but I don't find this Class anywhere in API collection of J2EE and also I dont find forName()
    Can anyone explain how it works?
    thanks

  2. #2
    tommy is offline Member
    Join Date
    Jul 2007
    Posts
    41
    Rep Power
    0

    Default

    JDBC (for the most part) is part of the JSE . And, although the method "forName" of the class "Class" is used very often when using JDBC (for loading the Driver), the class "Class" is not part of JDBC, but rather is one of the base classes for Java itself and is, of course, part of the JSE.

  3. #3
    varunthecool is offline Member
    Join Date
    Jul 2007
    Location
    bangalore,india
    Posts
    19
    Rep Power
    0

    Post class

    syntax
    Class.forName("sun.odbc.jdbc.JdbcOdbcDriver");

    in case of sql connectivity

    now
    Class is a base class in the J2se API not in J2ee API so look core java documentation.it contains the forName() method.used for loading drivers.,

  4. #4
    arfatkhan is offline Member
    Join Date
    Jul 2007
    Posts
    9
    Rep Power
    0

    Default

    Hi,

    The Systax:
    Class.forName("DriverName");

    You can find this Class in java.lang i.e in j2se API not in J2ee API. This Class contains the method forName(). By using this method you can load the driver.

  5. #5
    oregon is offline Member
    Join Date
    Jul 2007
    Posts
    41
    Rep Power
    0

Similar Threads

  1. Replies: 1
    Last Post: 03-14-2008, 02:51 PM
  2. Abstract Class question
    By maa11235 in forum New To Java
    Replies: 1
    Last Post: 01-05-2008, 10:30 PM
  3. class organization question
    By maa11235 in forum New To Java
    Replies: 0
    Last Post: 12-17-2007, 03:25 AM
  4. about Class.forName
    By angus203 in forum New To Java
    Replies: 0
    Last Post: 11-25-2007, 04:47 AM
  5. question regarding class
    By kavithas in forum New To Java
    Replies: 4
    Last Post: 11-16-2007, 09:12 AM

Posting Permissions

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