I'm developing a project in Java. When I export the project in .jar, I need to start mysqld to run my database. I start mysqld using a .bat file which this file is needed to be opened every time user opens the main file to access to database. The batch file content is:
.\data\bin\mysqld.exe --no-defaults --console --port=3306 --collation-server=utf8_persian_ci --character-set-server=utf8 --socket=mysql.sock --basedir=.\data --datadir=.\data\data --pid-file=".\data\data\MysqldResource.pid pause
The data folder contains database files and is placed in the same folder with .jar and .bat files.
I don't know how to open the .bat file from the Java code.
The code of executing .bat file is written under the one of the project packages.
Please help me. Thanks.