English 中文(简体)
提供从MySQL(自成一体)开始的支离破碎的申请
原标题:Deliver a java application that starts MySQL (self-contained app)

我有一个(对我来说是复杂的)问题,但大灾难试图在这一read子中只处理1个问题。

我有一刀切的申请,后附有一个MySQL数据库。

我希望能够与数据库一道通过安装机(目前也是我尚未找到解决办法的一部分)提交申请。

Anyway the problem for now, is that my preference is that MySQL should not be installed as a service.
My reason is that I would prefer not to modify the machine, that my application will be deployed.
I prefer to deliver a "self-contained" application.

So if MySQL is not installed as a service, then it must be started somehow.
I know that I can start MySQL as a standalone using:

www.un.org/Depts/DGACM/index_chinese.htm www.un.org/chinese/sc/presidency.asp

在这种情况下,一个新的指挥线窗口和MySQL跑道(我迄今为止在开发/编码测试过程中使用这一窗口)。

我不知道,一旦提出申请,我如何能够发挥同样的作用(而且从业守则开始,我的后勤中心)。

我想利用 rel=“nofollow”>Runtime,并做一些事情:

Runtime rt = Runtime.getRuntime();
Process pr = rt.exec("PATH\mysqld --standalone --console"); //PATH is of course the appropriate path to MySQL installation

But this does not seem to do anything. It just remains hunging.

理想的情况是,我要开始MySQL

Is there a solution to my problem?

最佳回答

Check MySQL Connector/MXJ. You can download it from here.It gives complete control over start and stop of database.Once you download and extract the zip, check ConnectorMXJObjectTestExample.java under src folder. It will give you complete idea.

问题回答

你们为什么想要使你们的生活变得艰难? http://en.wikipedia.org/wiki/Embedded_database”rel=“nofollow” 床位数据库,例如:





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签