Java, MySQL: Is there a way to embed a MySQL server with a Java program?

前端 未结 4 1183
一向
一向 2020-12-06 09:53

One thing I love about .NET is the ability to have a database file along with the project. I know that using a SQLite database, this can be done, but did someone achieve thi

4条回答
  •  一向
    一向 (楼主)
    2020-12-06 10:46

    It sounds like you want an embedded database. While MySQL Connector seems nice, it will launch a separate server process. If you want the database server to run in the Java virtual machine, there are several embedded databases for Java.

    The two that I've seen used the most are:

    1. Apache Derby / JavaDB
    2. HSQL

提交回复
热议问题