By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,032 Members | 825 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,032 IT Pros & Developers. It's quick & easy.

Help in executing Mysql using java

P: 3
Hello there
I have a problem in executing mysql using java netbeans.
all i want is to execute a batch file. this is my code:


"try
{
Runtime.getRuntime().exec("C:\\Program Files\\MySQL\\MySQL Server 4.1\\bin\\mysql.exe mysql -u root -p -D gino < C:\\projects\\sample\\gino.txt");
}
catch(Exception e)
{
System.out.println(e.getMessage());
System.out.println(e.getCause());
}"

How come this code doesn't work when trying with mysql but when i try this code for my reports using reportmill it works fine....can anyone help me
Nov 16 '06 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.