Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-20-2007, 01:08 AM
Member
 
Join Date: Jul 2007
Posts: 41
oregon is on a distinguished road
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
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-24-2007, 03:48 AM
Member
 
Join Date: Jul 2007
Posts: 41
tommy is on a distinguished road
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.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 07-27-2007, 04:12 PM
Member
 
Join Date: Jul 2007
Location: bangalore,india
Posts: 19
varunthecool is on a distinguished road
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.,
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 08-01-2007, 01:45 PM
Member
 
Join Date: Jul 2007
Posts: 9
arfatkhan is on a distinguished road
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.
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 08-01-2007, 06:52 PM
Member
 
Join Date: Jul 2007
Posts: 41
oregon is on a distinguished road
ok thanks to everybody!!
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
failure at Class.forName("oracle.jdbc.driver.OracleDriver"); RonNYC Eclipse 1 03-14-2008 04:51 PM
Abstract Class question maa11235 New To Java 1 01-06-2008 12:30 AM
class organization question maa11235 New To Java 0 12-17-2007 05:25 AM
about Class.forName angus203 New To Java 0 11-25-2007 06:47 AM
question regarding class kavithas New To Java 4 11-16-2007 11:12 AM


All times are GMT +3. The time now is 01:49 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org