• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MY swing database application can not connect

 
muntago Richard
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Tom Reilly
Rancher
Posts: 618
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Paul Clapham
Sheriff
Posts: 21000
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
muntago Richard
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

 
muntago Richard
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
besides, mysql connector is in the same directory as the Example.jar applications.
 
Paul Clapham
Sheriff
Posts: 21000
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
muntago Richard
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
YEAH I have gone through the tutorial links you provided and its working. You are the greatest. thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic