wood burning stoves*
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
Author

javaw.exe -classpath?

John Spindler
Greenhorn

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"
Sheriff

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
 
jQuery in Action, 2nd edition
 
subject: javaw.exe -classpath?
 
Similar Threads
JDeveloper classpath
You've seen it a thousand times before... "SQLException: No suitable driver"
JDBC drivers/getting JDBC started
MySQL configuration problem
ant and environment classpath