mardi 13 mai 2014

Se connecter à MySQL dans le fichier .jar java application - Stack Overflow


I've developed a database in MySQL workbench. I did the connection to MySQL in Netbeans in which I created a master/detail form which gives me the view of the chosen tables in the database.


The application runs fine when I have MySQL Workbench open and the USBWebserver running. Now, what I want/need to do is to do a connection to the database and to the MySQL server, in any computer. In other words, that I don't need to have MySQL workbench or the USBWebserver running.


I thought that maybe put the jbdc mysql server url to a classpath in the jar file...or just simply put the code that tells the form how do the connection by itself, but I'm a beginner in Netbeans so I don't have any idea if this is possible or the way to do it.


Thank you.



I've developed a database in MySQL workbench. I did the connection to MySQL in Netbeans in which I created a master/detail form which gives me the view of the chosen tables in the database.


The application runs fine when I have MySQL Workbench open and the USBWebserver running. Now, what I want/need to do is to do a connection to the database and to the MySQL server, in any computer. In other words, that I don't need to have MySQL workbench or the USBWebserver running.


I thought that maybe put the jbdc mysql server url to a classpath in the jar file...or just simply put the code that tells the form how do the connection by itself, but I'm a beginner in Netbeans so I don't have any idea if this is possible or the way to do it.


Thank you.


0 commentaires:

Enregistrer un commentaire