How to import the Mysql database using Java

I haven’t tested, but I think your problem is here:

                + jTextField2.getText() + path + ".sql");

As I read the code, the text field contains the path, and and the path variable too, so you get it twice in the command string. You also got ".sql" three times in total since you’ve already appended it to path before filling it into the text field. I suggest just:

                + path);

Leave a Comment