I have created a JavaFX application using to connect to a MySQL db using JDBC. Everything works perfect in eclipse, I am able to connect to my db using JDBC and perform insert update and select query's when I run my project in Eclipse. But, when I create an executable Jar file (file>export>Runnable JAR file) the db does not seem to connect or perform any of my query's.
Does anyone know how to fix this issue or if there is another way to export the project that will make it run correctly?
UPDATE: When exporting I needed to "Package required libraries into JAR" instead of "Extract required libraries into JAR", simple mistake
First of all you should make a library file for the jdbc you are using on your Project File
Example
Second, you should apply the libray by right clicking on your project file on the eclipse and click Properties
Click on this
And then apply the Library you needed.
Lastly dont forget to build the library along with the jar you are exporting by doing this on the export option
I Hope this helps!
Cheers!
Firebase Cloud Functions: PubSub, "res.on is not a function"
TypeError: Cannot read properties of undefined (reading 'createMessageComponentCollector')
The form requests the e-mail (optional)
Is it possible to search every field of every table for a particular value in Oracle?
Suppose i have a single table that contains a history of loans made to clients with the columns: