Re: classpath problem



On Apr 27, 5:24 pm, Lothar Kimmeringer <news200...@xxxxxxxxxxxxxx>
wrote:
Ravi wrote:
I complie the code with command 'javac First.class -classpath <full
path to the mysql-connector-java-3.1.14-bin.jar file>'

The problem is that I end up with the
error:java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

when I try to execute the class file.

You have to specify the same classpath when executing the
code, as well.

Regards, Lothar
--
Lothar Kimmeringer E-Mail: spamf...@xxxxxxxxxxxxxx
PGP-encrypted mails preferred (Key-ID: 0x8BC3CD81)

Always remember: The answer is forty-two, there can only be wrong
questions!

Will it also work if he puts his Java Connector jar file in his lib/
ext directory like:

C:\Program Files\Java\jre1.6.0\lib\ext


.



Relevant Pages

  • Re: Adding UNC paths to CLASSPATH
    ... >:The problem I've got is that I can't properly set the CLASSPATH required ... expecting that the jar file will already contain a manifest ... If this is all that's needed, then make sure your manifest contains one, ... Or specify them in a subdirectory and specify that in the ...
    (comp.lang.java.help)
  • Re: Mail Merge Print Range Problem
    ... The document created by executing a formletter to a new document is divided ... Therefore, to print part of it, it is necessary to specify ... which Sections you want to print which is the reason for using the "s" As ...
    (microsoft.public.word.mailmerge.fields)
  • RE: Paste not working in With statement - do I have too many Withs?
    ... Either specify a range or a cell reference on that sheet ... below is not executing properly in my code. ... subsequent subs (3 ranges, 10 variants) that run back to back after the sub ...
    (microsoft.public.excel.programming)
  • Re: ZipException when running jar file from command file
    ... > But I need to specify VM arguments, and I can't specify VM arguments in ... > the manifest file (unless somebody can tell me how, ... If I run it by double-clicking MyJar.cmd from Windows Explorer, ... > CLASSPATH wasn't set. ...
    (comp.lang.java.programmer)
  • Re: Automated tool for exe jar
    ... >> Setup your CLASSPATH and also ensure Java's BIN directory is in PATH, ... The newer JDKs can get that from their installation. ... Maybe you mean to specify the path variable in the manifest file? ...
    (comp.lang.java.programmer)