Forums Register Login

MY swing database application can not connect

+Pie Number of slices to send: Send
Good day able one, this my applications runs perfectly and insert data to database when i runs it as APPleme.java, but when i make executale and save it as Example.jar, when i runs it, open but on trying to insert values, it refuses to connect to database . can you tell me what is the problem
below is the code

so how do i make my executable files to connect my database via mysql connector
thanks
+Pie Number of slices to send: Send
Without seeing the actual error (please post), I'm only guessing. I infer from your post that you got your application running in Eclipse. Check that you have all the necessary dependent jar files in your jar file or that your classpath points to those dependent jar files.
+Pie Number of slices to send: Send
Without seeing a stack trace it's pretty hard to guess, but quite likely your executable jar's manifest doesn't specify the relative path to the JDBC driver's jar. Either that, or you didn't put the JDBC driver's jar in the directory where the manifest says it should go.
+Pie Number of slices to send: Send
THey wasn't any error. the code is perfect when i saved it as Appleme.java and runs it from apache. but when i make it executable as regards to Examples.jar, its no longer seeing or connecting to mysql database. here is my manifest and how do i link mysql connector.jar to the manifest

+Pie Number of slices to send: Send
besides, mysql connector is in the same directory as the Example.jar applications.
+Pie Number of slices to send: Send
 

muntago Richard wrote:THey wasn't any error.


Excellent! Then you don't have a problem and the case is closed, right?

here is my manifest and how do i link mysql connector.jar to the manifest


Ah. Apparently you do have a problem, then. So there is an error which causes this problem, you just haven't found any concrete evidence of it yet.

Anyway here's a link to the JAR tutorial. It would be much easier for you to read that rather than having somebody provide individual instruction to you.
+Pie Number of slices to send: Send
YEAH I have gone through the tutorial links you provided and its working. You are the greatest. thanks
Bring out your dead! Or a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 2493 times.
Similar Threads
JTabbedPane pblm.
Getting sql error [Microsoft ][odbc microsoft access driver]numeric index out of range
connecting java app to JAVADB...database
connecting java application to JAVADB...database
connecting java application to JAVADB database
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 07:56:29.