Doubt in loading Driver

I am connecting to Oracle Database.
I have written the following code to connect to a database
1 Class.forName("oracle.jdbc.driver.OracleDriver");
2 con = DriverManager.getConnection
("jdbc:oracle:thin:URL","USERNAME","PASSWORD");
3 st = con.createStatement();
Is it possible to connect to data base by Commenting the First line(Class.forName) and Provide the OracleDriver class in the class path.
here i have tried that but i am getting No Suitable Driver.
If possible please give me the syntax, how i can do this.

If you are asking the driver directly for a connection you don't need to register the driver with the DriverManager.
Which when beeing asked for a connection iterates over all registered drivers and asks each driver through acceptsUrl() if it can provide a connection for the given URL. AFAIK the DriverManager then calls connect() on the driver instance, just like I did in my example

Similar Messages

  • Unable to load Driver Class

    Hi There:
    When I try to connect to the Oracle 8i via this applet , I get the following run time error.
    Any help will be appreciated.
    I am using j2sdkee1.3.1, jdk1.3.1_02 and Oracle8.
    I also need your suggestion please. I have inserted some BLOB data in the Oracle table. I will need to display the BLOB data to the end users. I plan to convert this BLOB data into string format so that my applet can display the same. Further the string will have to be edited by the end users. I will then convert this modified string back to byte array so that I can insert the same as BLOB.
    Please let me know applet or the servlet? Which is better option.
    Users are reluctant to use any kind of WebServer because it will introduce the additional layer of complexity.
    Any help will be greatly appreciated.
    Thanks in advance.
    C:\>AppletViewer JdbcApplet.html
    Unable to load Driver Class
    java.lang.ClassNotFoundException: java.io.FileNotFoundException: C:\oracle\jdbc\
    driver\OracleDriver.class (The system cannot find the path specified)
    The following code snippet fails because it is unable to find the suitable driver.
    if (conn == null)
         //make a connection to the db
         try {     
              // conn = DriverManager.getConnection ("jdbc:oracle:thin:@"+"localhost:1521:sys", "system", "manager");
              // conn = DriverManager.getConnection ("jdbc:oracle:thin:system/manager@(description=(address_list= (address=(pro tocol=tcp)(host=localhost)(port=1521)))(source_route=yes)(connect_data=(sid=sys)))" );
              Class.forName("oracle.jdbc.driver.OracleDriver");
              String conurl="jdbc:oracle:thin:@localhost:1521:sys";
              Connection con=DriverManager.getConnection(conurl,"system","manager");
         } catch ( Exception e ) {
              System.out.println ("Unable to load Driver Class");
              e.printStackTrace (System.out);
              // add send email notification about this fact
              return false;
    } // End of if Statement from conn...

    Hi,
    maybe I'm too late but try the following :
    It seems that Your IDE doesn't check the path to Your classesxxx.zip file.
    Or Your classesxxx.zip file is corrupt.
    We had this error after downloading the classes12.zip for Oracle versions
    higher 8.1.6.
    The original size of this file is 1.888kB.
    Remember Windows FTP is downloading in ascii mode per default.
    Or Your classpath isn't correct
    ( the Exception souns like this )
    Regards

  • 64-Bit Windows 7 Load Driver Installation Problem

    I am new to Mac and have recently got my hands on a new 17" MBP.
    The MBP is a 2011 model dating from about May.
    Not wanting to step 100% away from Windows I want to install Windows 7 as well and run Mac OS.
    I have tried installing Windows 7 32-Bit and it worked absolutely fine - no problems at all.
    However, when I tried to install 64-Bit Windows 7 I ran into a problem very early on in the installation.
    Before the part where you select the partition to install Windows on, I get a "Load Driver" message which reads:
    "A required CD/DVD drive device driver is missing. If you have a floppy disk, CD, DVD, or USB flash drive, please insert it now."
    I cannot eject the DVD to replace it with the Windows Support DVD that I burned (which I assume has the relevant drivers on), so I am a bit stuck.
    I tried googling and a few people suggested burning the disk at a slower speed, which I did and it made no difference at all.
    The fact that 32-Bit works lets me know I am doing things right, there must be something about the 64-Bit that the MBP doesn't like.
    Any help much appreciated. I have 8GB RAM and would like to use it all with both Mac OS AND Windows so 64-Bit is preferred.
    Thanks in advance.

    Hi guys,
    I have exactly the same problem.
    I have a macbook pro 15 late 2011 and I tried for hours to find a driver for superdrive but nothing at the moment...
    If someone could help us it would be great
    Thanks

  • Windows 7 Installation problem: "no drives were found, click to load driver..."

    I just purchased a Toshiba Satellite laptop (U945-S4140) that came with windows 8. I am trying to install windows 7 enterprise 64 bit.
    I have the installation file on a bootable USB stick. In order to boot from the USB, I have to go into the BIOS settings and change from UEFI to CSM boot mode. Then the computer will boot from the usb stick and the windows 7 installation begins to work fine.
    However, I soon get an error message that "no drives were found. click to load driver to provide a mass storage driver for installation."
    I cannot figure out how to proceed. Any help would be greatly appreciated.
    Cheers

    I have tried many solutions....Maybe I should provide more details on my options.
    Through my university I am granted the rights & license to use a copy on windows enterprise. From them I obtained a valid product key and also downloaded an ISO install file. It seems as if this file was designed to be burned to a dvd. I used windows 7 usb/dvd tool to burn the ISO file to a DVD. No problem there. However, my new laptop does not have an optical drive. So, I borrowed an external one that plugs in via USB. Again, in order to get ANYTHING to happen, I need to boot the USB(dvd rive) in CSM mode. Even then, it doesn't work. (I'm sorry but I forget the specific error I got here.....there have been so many methods and so many errors today)
    Now, with this DVD, I have had a little bit of progress if I click the setup.exe file while Windows 8 is running. It begins the Windows 7 setup program, and even sees the harddrive! It asks me what partition I want to install to, and I selected the only 1 (of 4) that it said was 'available' to write to. Then, it loaded the installation files, but when it went to automatically restart, it froze during the 'starting windows' screen just as the little colored circles appear, that eventually form the windows logo. Again, I think the problem here might have been that during the restart, it looked to the USB-DVD drive, which needs CSM mode to boot properly, but Windows 8 can only start in UEFI mode.
    Any attempt to put this ISO file onto a USB stick have not worked well. I used Rufus and the only thing that slightly worked was burning the ISO to the USB stick with a 'GPT partition scheme for UEFI controller' with the 'FAT32' file system. When using this to boot, I did not have to change the BIOS to CSM mode. The screen for 'loading files' came up like the installer was going to work. However, the computer then froze during the 'Starting Windows' screen, however, this time the little circles actually were able to form the windows logo. But, at that point I was left with a pulsing windows logo and it was stuck. It did not even make it to the actual installer.
    The situation I posted about originally is slightly different. Some tech guys at my department's electronic shop have a bootable USB stick with the windows 7 enterprise installation software already on it. I used that and was at least able to get a little bit into the windows 7 setup before it told me it cannot find a disk to install to (as in my original post).

  • Windows 7 Installation problem: "no drives were found, click to load driver to provide a mass storage driver..."

    I just purchased a Toshiba Satellite laptop (U945-S4140) that came with windows 8. I am trying to install windows 7 enterprise 64 bit.
    I have the installation file on a bootable USB stick. In order to boot from the USB, I have to go into the BIOS settings and change from UEFI to CSM boot mode. Then the computer will boot from the usb stick and the windows 7 installation begins to work fine.
    However, I soon get an error message that "no drives were found. click to load driver to provide a mass storage driver for installation."
    I cannot figure out how to proceed. Any help would be greatly appreciated.
    Cheers

    Hello Maxxpower33, thank you for your words.
    I looked through the error logs that could be generated from the tool and found this one which may be what you experienced.  Kindly let me know if this is what you got:
    "Files copied successfully. However, we were unable to run bootsect to make the USB device bootable. If you need assistance with bootsect, please click the "Online Help" link above for more information."
    Some further information is that I found this post where another user experienced the same error on a laptop, although the speculation mentioned in the post is that the user does not have a Windows store account under which he purchased the license for Windows
    7 Home Premium, which is the flavor he was trying to get on the bootable drive.  However, this does not seem to be a valid response due to the fact that the tool does not check Windows XAuthCert Servers for validation on licensing.  So ignore that
    portion of the post, but the 2nd post helps a bit by linking to another article, providing both below.
    Forum Port With Same Error
    Article with 4 methods to create
    a bootable Windows 7 USB Drive
    In that first post, further down, is another reply to a tool that I have not tested with.  So please use caution on this one as I cannot find very much feedback other than on their own website, but sounds much like the first tool I mentioned in my first
    post "Unetbootin", but this one is called Rufus, and two people did mention they had good success with this tool after having difficulties with the Windows utility.
    Rufus
    After all that is said and done, there is not 1 tool that will work for everyone all of the time on every environment.  Why?  I would like to know also...but speculate hardware/firmware/bios combinations could be the culprit.  One of these
    tools should work for you and it would be my recommendation to try them in this order (skipping what you've already tried):
    1) Windows 7 USB/DVD Download Tool
    2) Unetbootin
    3) Manually creating the partition and xcopy'ing the extracted ISO to it
    4) Rufus
    5) Borrow a PC with a DVD-R in it and burn the ISO to a disc and install from it.  If your laptop does not have a DVD drive, an external drive can be purchased for roughly $25 or less.  Or if you have an internal drive laying around, buy an enclosure
    for about $15 and put the drive inside there and attach it to your laptop via USB or eSATA.
    As always, my advice is nothing more than my opinion, which are like bungholes...everyone has one and they all stink!  LOL!
    John Fester

  • Can't load driver for Mitshubitchi photo printer CP-D70DW.It downloads, but "Run" doesnt do anythin

    I Down loaded Driver from Mitshubishi website, It is  a 64 bit driver for windows seven. I opened the file on my desktop  hit "Run" and nothing happens. Is this an hp problem or mitsubitchi problem? Any suggestions?

    Tjmmcc, welcome to the forum.
    I believe it would be better if you contact the printer manufacturer for help.  They have the technical information.
    Signature:
    HP TouchPad - 1.2 GHz; 1 GB memory; 32 GB storage; WebOS/CyanogenMod 11(Kit Kat)
    HP 10 Plus; Android-Kit Kat; 1.0 GHz Allwinner A31 ARM Cortex A7 Quad Core Processor ; 2GB RAM Memory Long: 2 GB DDR3L SDRAM (1600MHz); 16GB disable eMMC 16GB v4.51
    HP Omen; i7-4710QH; 8 GB memory; 256 GB San Disk SSD; Win 8.1
    HP Photosmart 7520 AIO
    ++++++++++++++++++
    **Click the Thumbs Up+ to say 'Thanks' and the 'Accept as Solution' if I have solved your problem.**
    Intelligence is God given; Wisdom is the sum of our mistakes!
    I am not an HP employee.

  • HT1338 I can't load driver for HP 6500A printer / scanner

    I can't load driver for HP 6500A printer / scanner

    What does that mean? Have you downloaded the drivers and to installed them? Have you tried adding the printer with the AirPrint Driver?

  • A500 slot-loading drive doesn't work

    I started using my A500 on the 24th of December 2009. Now my slot-loading drive just spits out every disc i put in it.
    I've also noticed that most of my toshiba softwares like disc creator loads with these errors when starting: Unexpected error occurred. Error Code: 320129-49-00000015 and Error Code: 32007C-49-00000015
    My Recovery Media Creator also starts with this error: Cannot get Disk Driver Information followed by An unexpected error occurred. Please quit this application and restart it.
    (Error Code: 0D00F6-49-00000015) and (Error Code: 0D016E-49-00000015)
    could they be related? Any help would do.. thanks

    Another thought--do you have an external hard drive? If so. I believe you could mount it on your computer and copy the iLife applications onto it. Then you could mount the external drive on the iBook and drag the applications off of it onto the dock. I think that would work--I did that successfully with Garage band once--I moved it to the external hard drive to free up space on my iBook. At a later time, I was able to move it back. If you don't have an external hard drive, it's worth a few $$ to get one so you can use it for backup.
    Also, there is a migration Assistant in the utilities folder which is supposed to be used for moving data from one computer to another. I don't know if it works for applications or not--having only one computer, I have never had occasion to use it. But it might work.
    Good luck!

  • Installing windows vista load driver problem

    I am trying to load Windows Vista Ultimate SP1 32. I follow the bootcamp assistant instructions. I select "Disk 0 Partition 3 BOOTCAMP" as instructed but the "Next" button will not function. I can tab or select between drives, Refresh and Load Driver but cannot get to Next. The Bootcamp instructions say to load drivers after Windows is installed but I can't get Windows installed?? What am I doing wrong?
    Thanks,
    Bill

    Found my own problem. Had to click on drive options advanced and format. That still didn't work because the disk was too small. Increased disk size and successfully completed install.

  • Pcipsy: cannot load driver in solaris 10

    on a Sun SPARC Enterprise T5120 server install patches some details from 142909-17 kernel patch them, 144300-01 ln, cp patch, patch 145006-03 webmin and utilities patch 119254-76 and reboot the server to load the installed new patches could not start well and I mark the following error:
    pcipsy: can not load driver
    pcipsy: can not load driver
    Can not load drivers for / pci @ 0 / pci @ 0 / pci @ 2 / scsi @ 0 / disk @ 0,0: a
    in name_to_major driver appears as:
    pcipsy 111
    in driver_aliases the following appears:
    pcipsy pci
    pcipsy "pci108e, 8000"
    pcipsy "pci108e, a000"
    pcipsy "pci108e, a001"
    pcipsy "pciclass, 060000"
    I mirror the OS with svm, which try to restart the server again is to uninstall these patches installed starting in failsafe mode and mount a part of patchrm mirror and run the patch can not be uninstalled.
    any idea.

    You start by looking in Sun's Hardware Compatibility List (HCL) for Solaris.
    [http://www.sun.com/bigadmin/hcl/data/sol/|http://www.sun.com/bigadmin/hcl/data/sol/]
    In there, you will see that you have three choices for the 8139x chipset.
    You let the NIC be recognized natively during the OS installation (it just works), or you can use Realtek's driver from their web site, or you can use the third-party drivers hosted on Masayuki Murayama's site.
    The downloads from Realtek and from the Murayama site include README files with instructions.

  • Why class.forName to load driver

    hi all,
    as most of the times the loading of jdbc driver is carried out
    by using the function class.forName, Why so ?
    as i tryied with creating the object of the driver class like
    Object driver = new <JDBC DRIVER>;and the code worked fine
    so is there any difference in the two methods of loading the
    drivers ?
    if not wot is the use of method class.forname ?
    thanx

    That 's fine, but what if you change database back end in near future.
    I will define a property and used class.forName ("read property").
    In your case, you have to change the code about loading the JDBC driver as well.
    Using std. JDBC API functionality and loading driver dynamically, leaves some of the part of the code that are not a candidate for a change in case back-end DB is changed.
    BS

  • JDBC error - Unable to find or load Driver

    Hi,
    I'm attempting to connect to a MySQL database with using the statement below, using MySQL Connector 3.0.8:
    public void connectToDB() {
    try {
    connection = DriverManager.getConnection(
    "jdbc:mysql://localhost:3306/accounts?user=root&password=spider");
    } catch(SQLException connectException) {
    System.out.println(connectException.getMessage());
    System.out.println(connectException.getSQLState());
    System.out.println(connectException.getErrorCode());
    However, I obtain the error shown below when executing my code:
    C:\> java Accounts
    Unable to find and load Driver
    which is an output from:
    public Accounts() {
    try {
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    } catch (Exception e) {
    System.err.println("Unable to find and load driver");
    System.exit(1);
    My database is not located on another machine, but on the same machine rather (127.0.0.1) i.e. on my local PC.
    I've tried trouble shooting the problem by:
    C:\> telnet localhost 3306
    Bad Connection 4.0.20a-max@!5
    Connection to host lost
    C:\> ping 127.0.0.1
    4.0.20a-maCGxG;2&f,&#9787;
    Connection to host lost.
    C:\>ping 127.0.0.1:3306
    Ping request could not find host 127.0.0.1:3306. Please check the name and try a
    gain.
    C:\>ping 127.0.0.1
    Pinging 127.0.0.1 with 32 bytes of data:
    Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
    Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
    Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
    Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
    Ping statistics for 127.0.0.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms
    C:\>
    Could anyone kindly tell me where did I go wrong, and how do I go about solving this issue?
    Below is the complete set of code(Accounts.java) which querries, inserts and deletes entries in the database.
    Thanks in advance.
    // Accounts.java
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.sql.*;
    import java.util.*;
    public class Accounts extends JFrame {
    private JButton getAccountButton,
    insertAccountButton,
    deleteAccountButton,
    updateAccountButton;
    private JList accountNumberList;
    private Connection connection;
    private JTextField accountIDText,
    usernameText,
    passwordText,
    tsText,
    activeTSText;
    private JTextArea errorText;
    public Accounts() {
    try {
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    } catch (Exception e) {
    System.err.println("Unable to find and load driver");
    System.exit(1);
    private void loadAccounts() {
    Vector v = new Vector();
    try {
    Statement statement = connection.createStatement();
    ResultSet rs = statement.executeQuery("SELECT acc_id FROM acc_acc");
    while(rs.next()) {
    v.addElement(rs.getString("acc_id"));
    rs.close();
    } catch(SQLException e) {
    displaySQLErrors(e);
    accountNumberList.setListData(v);
    private void buildGUI() {
    Container c = getContentPane();
    c.setLayout(new FlowLayout());
    accountNumberList = new JList();
    loadAccounts();
    accountNumberList.setVisibleRowCount(2);
    JScrollPane accountNumberListScrollPane = new JScrollPane(accountNumberList);
    //Do Get Account Button
    getAccountButton = new JButton("Get Account");
    getAccountButton.addActionListener (
    new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    try {
    Statement statement = connection.createStatement();
    ResultSet rs = statement.executeQuery("SELECT * FROM acc_acc WHERE acc_id = " + accountNumberList.getSelectedValue());
    if (rs.next()) {
    accountIDText.setText(rs.getString("acc_id"));
    usernameText.setText(rs.getString("username"));
    passwordText.setText(rs.getString("password"));
    tsText.setText(rs.getString("ts"));
    activeTSText.setText(rs.getString("act_ts"));
    } catch(SQLException selectException) {
    displaySQLErrors(selectException);
    //Do Insert Account Button
    insertAccountButton = new JButton("Insert Account");
    insertAccountButton.addActionListener (
    new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    try {
    Statement statement = connection.createStatement();
    int i = statement.executeUpdate("INSERT INTO acc_acc VALUES(" +
    accountIDText.getText() + ", " +
    "'" + usernameText.getText() + "', " +
    "'" + passwordText.getText() + "', " +
    "0" + ", " +
    "now())");
    errorText.append("Inserted " + i + " rows successfully");
    accountNumberList.removeAll();
    loadAccounts();
    } catch(SQLException insertException) {
    displaySQLErrors(insertException);
    //Do Delete Account Button
    deleteAccountButton = new JButton("Delete Account");
    deleteAccountButton.addActionListener (
    new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    try {
    Statement statement = connection.createStatement();
    int i = statement.executeUpdate("DELETE FROM acc_acc WHERE acc_id = " +
    accountNumberList.getSelectedValue());
    errorText.append("Deleted " + i + " rows successfully");
    accountNumberList.removeAll();
    loadAccounts();
    } catch(SQLException insertException) {
    displaySQLErrors(insertException);
    //Do Update Account Button
    updateAccountButton = new JButton("Update Account");
    updateAccountButton.addActionListener (
    new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    try {
    Statement statement = connection.createStatement();
    int i = statement.executeUpdate("UPDATE acc_acc " +
    "SET username='" + usernameText.getText() + "', " +
    "password='" + passwordText.getText() + "', " +
    "act_ts = now() " +
    "WHERE acc_id = " + accountNumberList.getSelectedValue());
    errorText.append("Updated " + i + " rows successfully");
    accountNumberList.removeAll();
    loadAccounts();
    } catch(SQLException insertException) {
    displaySQLErrors(insertException);
    JPanel first = new JPanel(new GridLayout(5,1));
    first.add(accountNumberListScrollPane);
    first.add(getAccountButton);
    first.add(insertAccountButton);
    first.add(deleteAccountButton);
    first.add(updateAccountButton);
    accountIDText = new JTextField(15);
    usernameText = new JTextField(15);
    passwordText = new JTextField(15);
    tsText = new JTextField(15);
    activeTSText = new JTextField(15);
    errorText = new JTextArea(5, 15);
    errorText.setEditable(false);
    JPanel second = new JPanel();
    second.setLayout(new GridLayout(6,1));
    second.add(accountIDText);
    second.add(usernameText);
    second.add(passwordText);
    second.add(tsText);
    second.add(activeTSText);
    JPanel third = new JPanel();
    third.add(new JScrollPane(errorText));
    c.add(first);
    c.add(second);
    c.add(third);
    setSize(500,500);
    show();
    public void connectToDB() {
    try {
    connection = DriverManager.getConnection(
    "jdbc:mysql://localhost:3306/accounts?user=root&password=spider");
    } catch(SQLException connectException) {
    System.out.println(connectException.getMessage());
    System.out.println(connectException.getSQLState());
    System.out.println(connectException.getErrorCode());
    private void displaySQLErrors(SQLException e) {
    errorText.append("SQLException: " + e.getMessage() + "\n");
    errorText.append("SQLState: " + e.getSQLState() + "\n");
    errorText.append("VendorError: " + e.getErrorCode() + "\n");
    private void init() {
    connectToDB();
    public static void main(String[] args) {
    Accounts accounts = new Accounts();
    accounts.addWindowListener(
    new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    System.exit(0);
    accounts.init();
    accounts.buildGUI();
    }

    Hi,
    Below is my PATH setting to the MySQL JDBC JAR added in the autoexec.bat file:
    PATH C:\j2sdk1.4.1_01\bin;C:\mysql-connector-java-3.0.8-stable-bin.jar;%CLASSPATH%
    Could you tell me where did I go wrong & how can I fix this problem?
    FYI, I'm using a Windows XP platform.
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    C:\mysql\bin>net stop mysql
    The MySQL service is stopping..
    The MySQL service was stopped successfully.
    C:\mysql\bin>mysqld.exe
    C:\mysql\bin>net stop mysql
    The MySQL service is not started.
    More help is available by typing NET HELPMSG 3521.
    C:\mysql\bin>net start mysql
    The MySQL service is starting.
    The MySQL service was started successfully.
    I then tried initiating the MySQL client also on the same PC machine, but obtained the error below:
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    C:\mysql\bin>mysql.exe
    ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)
    C:\mysql\bin>telnet localhost 3306
    Connecting To localhost...Could not open connection to the host, on port 3306: C
    onnect failed
    C:\mysql\bin>
    Could you or anyone else help me on this problem? I'm still a newbie with MySQL and JDBC.
    Thanks in advance

  • Inserting a CD into Slot-Loading Drive

    I'm new to Mac. I just bought a latest MacBook a couple days ago. I have a question about slot-loading drive. I'm not really familiar with this drive. Once, I tried to insert a CD. I forced my cd, but the surface didn't let my CD go inside. So, I just tried again, just like swiping my credit card. Then, my CD went inside. Is there any specific instruction to insert a CD into this drive?

    Thanks for your answer.
    (Actually, I made a mistake here.
    I should not ask this question here because I don't have an original MacBook.)
    However, I still feel that it's not that simple.
    As you said, I held the CD by edges, and the CD is level with the drive bay. If I try to slide the CD into the drive directly, the CD doesn't really get inside very easily. However, If I push the CD from the right edge of the drive bay and move the CD to the left while pushing it to the drive bay, the CD finally gets in, and the drive will take it. This is why I was about to break my CD.

  • Exception in thread "main" related to CLASSPATH and unable to load driver??

    Hi,
    I am a JAVA beginner, I have met some problems cannot solve, can somebody help?
    My OS is Windows2000
    Java SDK in C:\j2sdk-1_4_2_04 and Java JRE in C:\Program Files\Java\j2re1.4.2_04 [Installation: j2sdk-1_4_2_04-windows-i586-p.exe]
    MySQL in C:\mysql [Installation: mysql-4.0.18-win.zip]
    MyODBC in C:\Download\MYODBC [Installation: MyODBC-3.51.06.exe]
    MyJDBC in C:\mysql-connector-java-3.0.11-stable [Installation: mysql-connector-java-3.0.11-stable.zip]
    Enviornment Variables Settings
    PATH = C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\j2sdk1.4.2_04\bin;C:\mysql\bin
    JAVA_HOME = C:\j2sdk1.4.2_04
    (CASE ONE) - While I didn't set a new Enviornment Variable for CLASSPATH
    HelloWorld.class can work properly and LoadDriver.class cannot work due to Unable to load Driver (As below)
    C:\JavaTry>javac HelloWorld.java
    C:\JavaTry>java HelloWorld
    Hello World!
    C:\JavaTry>javac LoadDriver.java
    C:\JavaTry>java LoadDriver
    Unable to load driver.
    java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at LoadDriver.main(LoadDriver.java:7)
    (CASE TWO) - While I set a new Enviornment Variable for CLASSPATH (No matter which settings as below)
    CLASSPATH = C:\mysql-connector-java-3.0.11-stable\mysql-connector-java-3.0.11-stable-bin.jar
    CLASSPATH = C:\mysql-connector-java-3.0.11-stable
    CLASSPATH = C:\mysql-connector-java-3.0.11-stable\com;C:\mysql-connector-java-3.0.11-stable\org
    Both the HelloWorld.class and LoadDriver cannot work properly due to Exception in thread "main" java.lang.NoClassDefFoundError (As below)
    C:\JavaTry>javac HelloWorld.java
    C:\JavaTry>java HelloWorld
    Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld
    C:\JavaTry>javac LoadDriver.java
    C:\JavaTry>java LoadDriver
    Exception in thread "main" java.lang.NoClassDefFoundError: LoadDriver
    Below are the JAVA scripts which I used
    -> HelloWorld.java
    public class HelloWorld {
    public static void main(String[] args) {
    System.out.println("Hello World!");
    -> LoadDriver.java
    import java.sql.*;
    public class LoadDriver {
    public static void main(String[] Args) {
    try {
    Class.forName("org.gjt.mm.mysql.Driver").newInstance();
    /* Class.forName("com.mysql.jdbc.Driver").newInstance(); <- either one try the same */
    } catch (Exception E) {
    System.err.println("Unable to load driver.");
    E.printStackTrace();
    Moreover, I saw some information only standalone application need to set CLASSPATH, right??

    My problem "unable to load driver" have solved.
    I set the CLASSPATH = C:\mysql-connector-java-3.0.11-stable\mysql-connector-java-3.0.11-stable-bin.jar
    and try
    java -cp ".";%CLASSPATH% LoadDriver
    Thanks masnare again :> and who provided the link http://www.kevinboone.com/classpath.html in the forums others similar topics, actually I forgot which topic and who, so... :P no matter whom thanks very much :)

  • How to clean slot-load drive?

    I have a small issues that appears to not be software related. I am not exactly tech-savvy when it comes to apple products, thus I have had a hard time finding a solution.
    Basically, I have problems ejecting discs. Firstly, no matter what method of ejecting I attempt, it will not eject fully.
    After many attempts, it finally jutts out, but then gets pulled back in again. I have to contiuously eject until finally I can grab the disc and pull it out.
    Sometimes running my thumbnail across the "dust flap" helps, sometimes it doesn't. When I look, it appears pretty dusty.
    My Macbook Pro IS second hand. So it seems it came to me pretty dusty already.
    So after all those pointers, I came to the conclusion that either the dust flap was dirty or sticky, and, maybe, the slot load DVD drive needs cleaning.
    If not, can anyone point me to a permanent solution?
    Otherwise, can anyone tell me how to safely clean the dust flap and/or slot load drive.

    See -> http://support.apple.com/kb/HT2801??viewlocale=en_US.
    Good luck,
    Clinton

Maybe you are looking for

  • BO XI 3.1 Infoview issue

    Hi All, I am facing issue in Infoview. Not able to see the history of the instance of the reports. I am able to see the list of the instances when I click on the report and select History, but the links ( instance name) are not enabled to see the dat

  • Error 500 with shared calendars

    Hi, we have problems since some weeks with our calendar server.. again.. We are on Mac OS X Lion Server 10.7.4 In /var/log/caldavd/error.log I can see many enries with this: 2013-06-12 12:50:53+0200 [-] [caldav-5]  [-] [twext.web2.server#error] [Fail

  • Querying the data type of a table/view

    Is there a sql statement that will 'return' the data type of a specified table/view? For instance column x of table y has data type int, is there a statement such as: SELECT data_type FROM y WHERE column_name = 'x' I know the above won't work but it

  • Will This Work Without Upgrading PSU?

    I have a hp 500-199 desktop pc. I am not planning to upgrade psu. It is an 300 w http://www.newegg.com/Product/Product.aspx?Item=N8​2E16814121876&cm_re=Gt_740-_-14-121-876-_-Product Thank You!

  • HT204088 I'm charged thrice for a single purchase.Kindly let me know what to do??

    I'm charged thrice for a single purchase.Kindly let me know what to do??