Embedding mysql in java desktop application

后端 未结 5 651
臣服心动
臣服心动 2020-12-03 15:25

i am not clear about steps/configuration details about how i can embed mysql in a Java desktop application so that it(application) can be installed on any machine through a

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-03 16:12

    Take a look at http://dev.mysql.com/doc/refman/5.0/en/connector-mxj.html. I do not remember the exact details but I was able to embed MySQL db in desktop application without user needing to install it separately.

    The key class is com.mysql.management.MysqldResource.

    Here is the example, http://dev.mysql.com/doc/refman/5.0/en/connector-mxj-configuration-java-object.html

    The mysql-connector-mxj-gpl-db-files.jar file contains MySQL installation files for all the platforms. If you know which is your target platform, you can strip other platform versions from jar, to reduce download size for end user.

提交回复
热议问题