I've written a Java program that accesses an SQL database. In JGrasp the program works perfectly. No bugs at all. But when I create the jar file of the program and start it up outside of JGrasp it wont access the database for some reason. I specified the driver in the CLASSPATH, otherwise it wouldn't've worked in JGrasp, right? Does anyone know what would make it not connect to the database? The only difference is running the program in JGrasp or double-clicking the jar file; nothing else is changing.
Asked
Active
Viewed 431 times
1
-
No error, exception or anything? If that's the case, fix your code so that it reports connection errors (and possibly stop swallowing exceptions). – Mat Mar 25 '12 at 18:46
-
You really need to accept some of the very good answers posted to your other questions. It's the minimum appreciation you can show to people who took the time to answer you. – Perception Mar 25 '12 at 18:47
-
@Perception- If it was obvious how to do that I would, but I've never seen anything that lets me do that. Don't see anything that says 'accept answer' or the like.. – user939287 Mar 25 '12 at 19:03