File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes javaw.exe -classpath? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "javaw.exe -classpath?" Watch "javaw.exe -classpath?" New topic

javaw.exe -classpath?

John Spindler

Joined: Feb 12, 2002
Posts: 28
I really didn't know where to post this so here it is. I want to run a program that I wrote strictly from a floppy disk. It access the MySQL JDBC driver. When I have it setup on my hardrive with the .jar file in my classpath the program works just fine. Now I try to run the same program from the floppy with javaw.exe -classpath a:\mm-mysql-2.0.4-bin.jar;a:\ package.Main
and the program opens just fine however when an attempt to run some of the queries I get the error "no suitable driver found" it can't find the mysql driver but it's there. So I guess my question is does the javaw.exe accept the -classpath switch and if so why is mine not working?
thanks in advance to anyone who can help me.
Cindy Glass
"The Hood"

Joined: Sep 29, 2000
Posts: 8521
Yes the javaw can take a classpath parameter.
You say that the driver is on the floppy - yes?
Try resetting your path statement just before you invoke the program to include the a drive, so that the OS can find the MySQL stuff there.

"JavaRanch, where the deer and the Certified play" - David O'Meara
I agree. Here's the link:
subject: javaw.exe -classpath?
It's not a secret anymore!