How do you add a jar to the classpath?

I'm trying to load a driver for MySQL, but the program doesn't seem to find the driver. I get an exception everytime. I keep seeing references about adding the jar (mysql-connector-java-5.1.6-bin.jar) to the classpath, but I don't know how to do that. Also, do I only that the jar, because there are other files along with it (src, com, etc.). I'm running Windows XP and using Eclipse.
import java.sql.*;
public class Driver {
     public static void main (String[] args) {
          try {
               // Step 1: Load the MySQL driver.
               System.out.println("BP01");
               Class.forName("com.mysql.jdbc.Driver");
               System.out.println("BP02");
          } catch (Exception e) {
               System.err.println("Got an exception! ");
               System.err.println(e.getMessage());
}

In Windows Explorer or the Command Prompt, try changing your directory to what the message about not finding the JAR in the repository says (C:\Documents and Settings\xxx\Desktop\mysql-connector-java-5.1.6\) and verify that something called mysql-connector-java-5.1.6-bin.jar! exists there.

Similar Messages

  • OIM 9 - How do I add a jar to the classpath in WebLogic?

    I have a custom Scheduled Task that I am trying to add and it references a 3rd party library. I placed this 3rd party lib in /ext and restarted the server, but whenever I try to save my new Task, I get a ClassNotFound error for the 3rd party task. I don't know where I can add it to the class path.
    I start OIM via the /bin/xlStartWLS.sh which has no classpath's defined. The only file that has the OIM jars is the xlStartManagedServer.sh, but I don't see where that's getting called.
    Any help would be appreciated
    Thanks
    Alex

    found the answer, in xlStartWLS.sh there is a variable called EXT_POST_CLASSPATH... adding items here will eventually get added to the actual CLASSPATH

  • How do you add an image in the signature

    Hi,
    How do you add an image to the signature area.
    The Insert/edit image is not available when in My Settings | Personnel Info | Signature
    Regards
    Ray Farmer

    You need to link the image.  See the example for the Canada flag below.
    <img src="http://forums.ni.com/ni/attachments/ni/130/6908/1/Canada-small.PNG" border=0>
    Replace with the image you like.  This goes into the signature box within the profile tab of the personal settings.
    RayR

  • How do you add a format to the "Date Picker Format Mask" available formats?

    Hi,
    When I select the Date Picker Format Mask or "Number / Date Format" they doen't have YYYYMMDD or others that may be desired...
    How do you add a format to the available formats?
    Thank you, Bill

    Bill - From the popup help text:
    If you need to create a Date Picker item, but the format you need does not appear in the Display As list, select Date Picker (use application format mask). When an application uses this type of date picker, the Application Express engine derives the date format from an item named PICK_DATE_FORMAT_MASK. You can populate this item in two ways:
    - By defining an application substitution string named PICK_DATE_FORMAT_MASK
    - By creating an application-level item named PICK_DATE_FORMAT_MASK
    See the doc for more details.
    Scott

  • How do you add an entry in the monitor log from the update rules?

    How do you add an entry in the monitor log from the update rules?

    Check this link for relevant SAP recommended implementation.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/0c22e690-0201-0010-9581-832abdb5d50d
    Sample Code (Routine) available on the last page of the document.
    award points if useful

  • How do you add safari favourites with the new iOS?

    How do you add safari favourites with the new iOS?

    Do you mean you want to sync your desktop Safari bookmarks to iOS? This is done in iTunes when you sync the iOS device. There is a box to check to make this happen.

  • How do you add a mailbox to the iphone4s?

    How do you add a mailbox on the iphone4s?

    If you have an IMAP account, then add it on your server and it will appear on the iphone.
    If you have a POP account then you cannot.

  • How do you add a grid on the viewer?

    How do you add a grid on the viewer so you can lign up text and whatnot?  Thanks!

    I do just as you outline. It's covered in my article on Alignment Grids: http://forums.adobe.com/message/4319250#4319250
    I also agree that the Snap Tto Grid would be nice, like in Photoshop. I have sent in several Feature Requests for Grids, with full functions, like Snap To, though not recently.
    Hunt

  • How do you add multiple effects to the same clip

    How do you had multiple effects to the same clip. I have tried for hours
    I would like to add sepia and aged movie to the same clip. I heard it can be done, but have not figured out how to do it.
    anyone please.

    Normally you can apply only one video effect at a time. But for Sepia, black and white, and others that can be done through the video Adjustments tab, you are in luck.
    Aged Movie should already have a bit of a sepia tone.
    If you want more of a sepia tone or you want to fine tune the sepia effect you can do it with the Clip Inspector/Video Adjustments tab.
    Note: Thanks to Jeff Carlson of MacWorld for this tip.
    If you're looking for a washed-out sepia appearance, first open iMovie's preferences and turn on the Show Advanced Tools option, which adds more controls to the Video Adjustments HUD and other areas of the program. Select the clip you want to alter and press the V key. Set Saturation to 0 percent, and then drag the Red Gain slider to 143 percent, the Green Gain slider to 90 percent, and the Blue Gain slider to 53 percent (feel free to tweak these settings to customize the results). Click on Done when you're finished. Note that the clip thumbnail still appears in color, as the video was shot, but the preview reflects your changes.--JC
    If you need to apply the same settings to all clips, first select the clip you have adjusted. Then Edit/Copy. Then Edit/Select All. Then Edit/Paste Adjustments.

  • How do you add a source to the Health app?

    How do you add a source (ie, Nike +) to the new Health app?

    http://help.apple.com/iphone/8/

  • How do you add a percentage in the preloader?

    How do you add text that changes on the preloader as your site loads? for example a standard "0%" ... "100%" or even controll what frame a gif image displays?
    Thanks

    It is not easy to see and I found it by messing around. First of all put them in daye order by dragging the screen down and touching the little alarm clock at the top.  Then touch the space below the earlies reminder and a new one comes up. It defaults to 'today' so you have to touch the new reminder and then touch the 'i' button that appears. You can then change the date and time etc. No easy.
    I dont understand why Apple do these thongs before updating the user guide!
    Hope this helps.

  • How do you add a reminder on the ipad in iOS 7?

    I hate to admit defeat, but I'm stumped. How do you add a reminder in Reminders on the iPad 2 in iOS 7?

    It is not easy to see and I found it by messing around. First of all put them in daye order by dragging the screen down and touching the little alarm clock at the top.  Then touch the space below the earlies reminder and a new one comes up. It defaults to 'today' so you have to touch the new reminder and then touch the 'i' button that appears. You can then change the date and time etc. No easy.
    I dont understand why Apple do these thongs before updating the user guide!
    Hope this helps.

  • How do you add multiple cells to the LARGE function?

    I want to add several cells which are contained on different sheets and tables to the same LARGE function and select the first ranking cell value.
    How do I add these cells as a single argument for this function?

    "...and select the first ranking cell value."
    Hi eobet,
    If your actual goal is as stated, you could use MAX, which will accept a list, a range, or a list of ranges as arguments.
    LARGE accepts only a single argument to establish the set of values, plus a single argument to establish the rank of the desired value. That means you need to collect all of the vlues into a sngle contiguous group/range, then specify that range as the set. The avantage, ofcourse, is that with LARGE, you can specify that you want the 'third largest' value in the set.
    Here's an example.
    The data set is column B on tables Data 1 and Data 2.
    The set is collected into a single contiguous range on the table Aux (which may be hidden, or placed on a separate sheet).
    LARGE collects the nth value from the collected set in Aux, using this formula in the table Summary:
    A2, and filled down: =LARGE(Aux :: A:B,ROW()-1)
    MAX returns the largest value from the original data set on Data 1 and Data 2, using this formula on the table Summary-1:
    A2: =MAX(Data 1 :: B,Data 2 :: B)
    Regards,
    Barry

  • How do you add a hyperlink on the latest Keynote?

    I want to know how to add a hyperlink in the latest Keynote.  I am running Yosemite.  I have a Macbook Pro 13 inch.  Thank You.

    right click an object on the slide
    choose;   Add Link
    in the Link To, dropdown menu;    select Webpage
    in the Link text, entry box;   type the URL in the form:   www.mypage.com

  • How do you add a contact on the iPad mini

    I was wondering how you could add a contact on the iPad mini and people say there is a + sign on the contacts app and I do not have a + sign on mine. I got my ipad from a apple retail store.

    The plus sign should be at the bottom of the contacts App:
    Is it not there?

Maybe you are looking for

  • Table maintenance with insert records in SM30

    Hi Sapall. here i have just got a tricky situation. there is a Z table  which already been created by some body and when i insert a new record into it and then if  i click on save, it was asking me the  new transport requests but now the user dont wa

  • Sound advice from BT's business partner Lithium

    I was curious about who and what is behind our new forums, so popped over to the Lithium site and wandered around a bit. BT seem to have chosen a partner who has a good pedigree in online communities. A Lithium Guru, one PaulGi, has some great advice

  • 30 inch cinema disply

    I have streaking arcoss the display as well as color variations.   Of course you they cannot be seen in the brightness of the apple store. This is the same when attached to a laptop, G% Mac Pro and Quad Core Mac Pro. The variations are visible with f

  • Workaround for keyword button sets bug

    Thought I'd post this in case anyone else is beating their head against a wall trying to use custom keyword button sets. BUG: Control bar sometimes displays the wrong captions for the keyword buttons. Cause: Deselecting a keyword button set in the "E

  • Regarding matchcode

    hi to all experts,                           my question is what are match code and matchcode id . what are the differences between search help and match codes.help me  very urgent.