Access of MySQlL Driver class by eclipse but not from Outside Jar file

Dear All,
I have done a standalone application having access with MySQl database.
I could access it when i execute it from eclipse. But when i export it into Jar file and running I get MySQL Driver class not found exception.
Give me a better solution for this issue.

CLASSPATH, CLASSPATH, CLASSPATH.
You have defined the Eclipses Project Library Path to include the MySQL jar, but ar not including it on the classpath when executing the jar.
Either modify the MANIFEST.mf file in the jar to include a reference to the MySQL driver jarfile or call java in the following manner
java -cp /full/path/to/MySQL/Driver/jarfile.jar -jar yourJarFile.jarObviously, if this is on Windows and you are executing through a double click, the first option is the best option.

Similar Messages

  • Program run in Netbeans but NOT running as jar file

    Dear all ,
    i hope any help in this problem.
    i am writing program to access parallel port i put next files :
    1. [ comm.jar + javax.comm.properties ] in
    [ C:\Program Files\Java\jdk1.6.0_18\lib ] and [ C:\Program Files\Java\jdk1.6.0_18\jre\lib ]
    2. [ win32com.dll ] in [ C:\WINDOWS\system32 ]
    when i run application in NetBeans IDE 6.8 work fine and every think is ok
    BUT when i produce jar file , generated jar file does not work [GUI appear but can not get ports on PC]
    - I try to set Environment Variable as next :
    CLASSPATH = .;C:\Program Files\Java\jdk1.6.0_18\lib\comm.jar
    also does not work
    any tip please ?
    Thanks in advance
    Nabil

    First of all, leave the lib and jre/lib directories of the JRE alone. Never ever touch them again. Remove any jars you have put there yourself, or better yet completely remove and reinstall the JRE to make sure you put it back in a correct state.
    After you do that, learn how to properly work with the classpath in both the IDE and the command line.
    Netbeans: you define the classpath by adding jars to the project (right click on the libraries node in the project tree to get the appropriate options).
    Command line: this depends on if you run a single class, or you invoke an executable jar.
    Single class: you use the -cp command line switch to define the classpath
    Executable jar: the jar itself defines the classpath in its META-INF/manifest.mf file. The -cp command line switch is ignored.
    Since you use Netbeans, you'll get an executable jar so make sure to learn how such a jar is structured.

  • Application works in jdeveloper but not as standalone jar file

    Hi All
    We have developed an application using BI Publisher APIs,it works as expected through JDevelper,however when I try to deploy it to a jar file a run it through command line it gives me No class found exception for
    javax/xml/rpc/Service class factory.. thinking that the class is not present.I have extracted the jar file but could find the class file in the expected directory........anyhelp would greatly be appreciated.
    Regards
    Venkatesh

    Hi Venkatesh,
    Few questions.
    1. What is your JDeveloper version? (Always better to post your JDev version along with the question, which would help us to help you better).
    2. Did you try adding webserviceclient.jar to the classpath? (Search in your JDev installation directory for the location of this jar file).
    -Arun

  • Application working under NetBeans but not as a *.jar file

    Hello,
    recently I found a little problem. I wrote application that shows all available ports in my computer. When I am running this applications under NetBeans it works with no problem - finds all available ports. Then I am building it to the *.jar file. Application is working with no problem but command:
    Enumeration PortIds = CommPortIdentifier.getPortIdentifiers();
    is not returning any identifiers - PortIds is empty.
    Anyone knows a solution for this type of problems? Thanks

    Hi Venkatesh,
    Few questions.
    1. What is your JDeveloper version? (Always better to post your JDev version along with the question, which would help us to help you better).
    2. Did you try adding webserviceclient.jar to the classpath? (Search in your JDev installation directory for the location of this jar file).
    -Arun

  • Exceptions in eclipse - but not in exported jar?

    Hello girls, hello boys,
    first of all merry christmas :)
    I'm developing sumthin in eclipse (win7) but when I try to run the app (which worked fine earlier - did a new checkout from cvs) it throws exceptions like this:
    "Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
         at visnav.master.cluster.TreeIterator.next(TreeIterator.java:37)
         at visnav.master.cluster.TreeIterator.next(TreeIterator.java:1)
         at visnav.master.PhotoRenderer.selectCluster(PhotoRenderer.java:97)
         at visnav.master.PhotoRenderer.access$2(PhotoRenderer.java:87)
         at visnav.master.PhotoRenderer$1.mouseMoved(PhotoRenderer.java:73)
         at java.awt.AWTEventMulticaster.mouseMoved(Unknown Source)
         at java.awt.AWTEventMulticaster.mouseMoved(Unknown Source)
         at java.awt.Component.processMouseMotionEvent(Unknown Source)
         at javax.swing.JComponent.processMouseMotionEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Exception in thread "AWT-EventQueue-0" javax.media.opengl.GLException: Error making context current: 6
         at com.sun.opengl.impl.windows.WindowsGLContext.makeCurrentImpl(WindowsGLContext.java:169)
         at com.sun.opengl.impl.windows.WindowsPbufferGLContext.makeCurrentImpl(WindowsPbufferGLContext.java:102)
         at com.sun.opengl.impl.GLContextImpl.makeCurrent(GLContextImpl.java:134)
         at com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:182)
         at com.sun.opengl.impl.GLPbufferImpl.maybeDoSingleThreadedWorkaround(GLPbufferImpl.java:208)
         at com.sun.opengl.impl.GLPbufferImpl.display(GLPbufferImpl.java:88)
         at javax.media.opengl.GLJPanel.paintComponent(GLJPanel.java:659)
         at visnav.master.vismap.InteractionMap.paintComponent(InteractionMap.java:754)
         at javax.swing.JComponent.paint(Unknown Source)
         at javax.swing.JComponent.paintToOffscreen(Unknown Source)
         at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
         at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
         at javax.swing.RepaintManager.paint(Unknown Source)
         at javax.swing.JComponent._paintImmediately(Unknown Source)
         at javax.swing.JComponent.paintImmediately(Unknown Source)
         at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
         at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
         at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source)
         at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
         at java.awt.event.InvocationEvent.dispatch(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)"
    When I export the app to a jar the jar works fine in Windows ...
    One thing I changed in my configuration: I tried to start the app using an external flatscreen. But that can't be the problem...?
    Thx for any kind of advice - can't test new code efficiently by exporting a jar each time...

    It would help to see the relevant code mentioned by the stack trace.

  • ARD works from inside network, but not from outside.

    I can connect me MB to my G5 no problem when on the network inside my home. But if I'm on another network (and supply the correct IP address) I get an "ARD Not Active" error.
    All seem to be well, both machine are up to date and this works locally.
    What's wrong?

    That I can't tell. I travel and all I can do is open ports at home. I have no control over the hotel's systems.
    This was up and working fine - now it just won't connect. Even for the same locations that used to work just fine.
    But perhaps this is something:
    I recently installed Parallels Desktop. Now in the Network pref Pane, there are "Parallels Guest-Host" and "Parallels NAT".
    That's new, could it be a clue?

  • Applet Works in Eclipse but not Online?

    I've got everything working in eclipse but now when I uploaded it to unix it wouldn't run. Any ideas? I chmod 664 all the java and class files. It won't print to the TextArea for some reason when I uploaded it.
    Here is my source
    http://www2.hawaii.edu/~akinsey/CD.java
    http://www2.hawaii.edu/~akinsey/CDStorage.java
    http://www2.hawaii.edu/~akinsey/CDStorage.html
    That will all compile and run in eclipse but doesn't work online :(

    If it runs in Eclipse, but not when deployed, the problem is probably classpath or security related. This is why those of us who use Eclipse in real production work, rarely use its builds. I always build with ANT and never run from within Eclipse. I alway use what Eclipse calls an "Externally Launched Server".

  • I need to delete files from my iMac hard drive, but not from my other devices (that are sync. to iCloud). How do I do this?? My Mac is a 24-inch Mid 2007 running on Mountain Lion. Thanks for your help.

    I have recently recieved messages indicating that my start up disc is almost full. Consequently I need to remove some files from my hard drive. I've backed up my hard drive onto a NAS system & onto an external harddrive. The problem now, is that whenever I try to delete a file, a message comes up saying that if I remove this file from my hard disc it will remove it from all my other devices that are syn. to it. How do I remove a file (movies) from my iMac but not from other devices.
    Thanks for your help
    Robert

    You're right - this question has nothing to do with iSync!
    You're best bet would be to buy yourself an external Firewire or USB 2.0 hard-disk. There's no way you'll get 150gb onto an 80gb drive - certainly not in an instantly accessible way.
    Your new Mac would've had the Migration Assistant appear during the initial OS install. This allows you to connect your new and old Mac together via a Firewire cable and automatically transfer your important files from old Mac to new.
    Once you've all the files off your old Mac, re-format it and re-install the OS that came with it. If you boot up the Mac from the OS install DVD, there is an option to re-format the HD and install the OS.
    See this Apple support page:
    http://docs.info.apple.com/article.html?path=Mac/10.4/en/mh1103.html

  • I have a time capsule connected directly to fiber connection. I have connected a windows server directly to TC and configured it for remote desktop connection. From my interanet I can access srvr but not from my home. What config I need on TC?

    I have a time capsule directly connected to fibre optic point out. All pcs and macs are connected wirelessly to the internet. I have connected a windows server pc to TC. When configured for Remote desktop connection, I can access windows server from within interanet but don't know how to access it from internet. I guess I need to change some settings in TC to get some ip adress for the remote desktop connection from my home. Anyone who can help me out? Appreciate it.
    Narmin

    I am a little lost now.. I have read again your title and your first post.. and they seem inconsistent.
    In the title you state.
    From my interanet I can access srvr but not from my home.
    Interanet is not a word I know.. I assumed intranet...are you talking about internet or intranet? And just to be clear say WAN or LAN.. !! Is your home part of the interanet??
    In the first post you state,
    I can access windows server from within interanet but don't know how to access it from internet.
    Now this is more normal.. the issue is not in the home at all, it is accessible from there but fails from internet. If this is correct, then you can do a few obvious things to determine where the problem is.
    But first I need to know are you actually testing from a different internet connection to your home lan.. you are not just trying the public IP from inside the LAN as that will fail due to the TC not doing NAT Loopback.
    I am also assuming the TC is the only router in the network, and has the public IP on the WAN interface.
    And I am also assuming you have turned on the ping responder and you can actually ping your public ip from the internet and get a response. This helps no end in figuring out where there are issues. Strange but I have no idea if there is a ping responder in the TC WAN so you might need to forward that as well. Also if you have a dynamic public ip address are you using dyndns or no-ip or some other service to connect.
    1. Test bypassing the TC.. plug the internet connection straight into the windows server,, and test if you have access. If yes, the TC is the problem.. if not, your setup on the windows server is wrong.. look at firewall in particular.
    2. Assuming from test 1 the TC is the problem, Post the screen shots of the port forwarding setup for us to look at.. that is by far the easiest way to check it out.
    There are lots of references to port forwarding in the TC.. eg
    http://must-know-mac.blogspot.com/2008/07/how-to-port-forward-time-capsule.html
    The things that generally go wrong are firewall on the computer that is accepting the port.
    The ISP doesn't allow connections on a particular port. (not likely in your case)
    The router is behind another router.. double NAT will kill any port forward.
    Upnp has already allocated a port.. not an issue as TC doesn't use upnp although a reboot of everything after you set port forwards is well worth it.. amazing how things don't stick properly without a reboot.
    IP on the receiving device is not static and so changes.
    Not enough or right type of ports are opened. This is always messier than it looks as one port is often not enough for two way communications.

  • DVD Drive issues, plays CDs but not DVD data or regular - Satellite (unknown series type)

    I tried to update the firmware but ran into some strange issues. First of all according to google, the drive is manufactured by Panasonic. Toshiba doesn't make their own drives? For this reason I wonder if it is improperly detecting the drive make/model.
    Anyways I downloaded the firmware update for it, version 1.03. It is a MAT**bleep**A UJDA760 (going from memory, model may be slightly diff like UDJA). When I run the firmware update it doesn't detect the drive at all and says it is for a THINKPAD?? Weird...
    Also, if you have a link to a guide for removing this drive I would appreciate it. I want to verify that windows is detecting the model/maker correctly. It is not one of the simple hotswap types, it looks like I have to remove at least the entire bottom of the laptop.
    I am working on this for a client, I do tech repair on craigslist but my laptop hardware expertise is limited most of my experience is with desktops.

    joe7dust wrote:
    I tried to update the firmware but ran into some strange issues. First of all according to google, the drive is manufactured by Panasonic. Toshiba doesn't make their own drives? For this reason I wonder if it is improperly detecting the drive make/model.
    Anyways I downloaded the firmware update for it, version 1.03. It is a MAT**bleep**A UJDA760 (going from memory, model may be slightly diff like UDJA). When I run the firmware update it doesn't detect the drive at all and says it is for a THINKPAD?? Weird...
    Also, if you have a link to a guide for removing this drive I would appreciate it. I want to verify that windows is detecting the model/maker correctly. It is not one of the simple hotswap types, it looks like I have to remove at least the entire bottom of the laptop.
    I am working on this for a client, I do tech repair on craigslist but my laptop hardware expertise is limited most of my experience is with desktops.
    Typically if the optical drive can read CDs but not DVDs (or vice versa), there has been a hardware failure of the DVD or CD circuitry.  Drivers/firmware aren't going to solve the problem, only replacement of the drive.
    Find the correct drive at http://www.sparepartswarehouse.com/
    Find unofficial disassembly instructions at http://www.irisvista.com/

  • How to access my hard drive when the system does not work

    how to access my hard drive when the system does not work

    Startup - Gray, Blue or White screen at boot, w/spinner/progress bar
    Startup Issues - Resolve
    Startup Issues - Resolve (2)

  • (InDesign CS5)I have created hundreds of InDesign documents incorporating images stored on an external USB connected drive. I did a manual back-up to another drive at regular intervals but far from ideal. I now have a network drive which is properly backe

    (InDesign CS5) I have created hundreds of InDesign documents incorporating images stored on an external USB connected drive. I did a manual back-up to another drive at regular intervals but far from ideal.
    I now have a network drive which is properly backed-up. I have copied all of the images and folder structure from the USB connected drive to this new drive.
    My question is how I get all of the links in my indd files to point to the new drive. I am aware how to do it one file at a time, but is there a way of doing the same thing over many files/folders at a time?

    It depends on how you organize your work. If you have one folder for images for a document, relinking one image should alert you that other missing images are in the same folder, but this assumes that images are missing. If the links window sees a clear path to the original location of the images, they aren't missing, so that won't work.
    Another thing to try is to select all of the images in the links window and go to the fly-out menu and select Relink To Folder (navigate to the new folder, and you don't even have to select any images by name).
    If you store your images in many different folders for the same document, you might want to either package the document to copy all of the images into one folder (you can specify to only copy images if you like) or use the fly-out in the links window (Utilities>Copy Links To…) and select or create a new images folder.

  • TS2621 I can access yahoo mail from safari but not from the iphone ipad mail icon after changing password

    I can access yahoo mail from safari but not from the iphone ipad mail app after changing my password

    Go into your settings and remove the account. Add the account again with your new password.
    Best of luck- K.

  • Can't Open File Explorer -- How can I reset the Quick Access Toolbar from outside of File Explorer?

    First of all, this is not a virus. This is my a bug within windows explorer itself.
    So, I added the properties button to the QAT, and it displayed it as an expandable menu, like this: ";" but with small arrows like this: ">". didn't want this, I wanted to click on it and immediately display the properties of the file
    to me. So, I hovered over it, right-clicked on "Properties" in this menu and added it to the QAT. Of course, this crashes File Explorer. Now whenever I try and open it, it crashes, so I have to assume that the corrupted button has been saved.
    So, my question is: How do I reset the QAT from OUTSIDE of file explorer? Regedit magic? Any ideas?
    Thanks for stopping by,
    Trolleyman.
    Edit: Just so you know, I can navigate through my systems files using the 7-zip file manager. Phew.

    Thanks from me  too, Niki. This first happened with Windows 8.0 File Manager a week ago,, and despite much research I couldn't  discover the cause so eventually I resorted to restoring  the system drive from backup (luckily I make daily backups, 
    so didn't lose   much  work).
    Without  knowing the cause  a  few days later I again tried to alter  the Quick Access  Toolbar  and the problem reappeared.  Should  I again resort to restoring the entire system drive, the thought horrified me. But
    luckily while doing a bit more research prior to resorting to the same drastic recovery, I cane  across this post  of yours and it worked!
    It doesn't  seem  to be  happening with Office 2007's   or  Wordpad's  Quick Access Toolbar,  so presumably it's a File Explorer bug  (a.k.a. Windows Explorer in Windows 7, of course). Have Microsoft recorded this as
    a  bug -- if not,  why not  -- and when  are they coming up with a fix?

  • Adding all dependent classes of an applet to make a jar file

    Hi everyone,
    I have this problem which I was not able to find a solution for, So I truly appreciate any feedback on this.
    I have a project on eclipse which is basically an applet.
    This applet is using some classes in some jars that I have imported as libraries for this project.
    Everything works on eclipse with no problem. However I need to make a jar file of the applet and required classes to use it in an html page.
    Now that's the part I have been facing difficulties, cuz I have to include all the classes that the applet is using from other jar
    files. And I can not come up with a way to find out all those classes.
    On the other side if I include the whole jars then my applet goes over 100 meg and would be useless.
    I am going to give an example of the problem I have in hope of making it a bit clear.
    I have a applet, which uses some classes from some jars. i.e., class A. but class A itself need class B and etc.
    Now how can I find all these dependencies since I have to include them along the applet in the jar file I am going to make.
    Once again I appreciate any feedback and sorry that is a long question.

    Fractalz wrote:
    . . . Now that's the part I have been facing difficulties, cuz I have to include all the classes that the applet is using from other jar
    files. And I can not come up with a way to find out all those classes.See the Class-Path: parameter (of a Manifest file) documentation here:
    http://java.sun.com/javase/6/docs/technotes/guides/jar/jar.html#Manifest-Overview

Maybe you are looking for