Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to start microsof access with parameter through runtime.exec

843798Jan 22 2007 — edited Feb 2 2007
Hi,

I try to start access with parameter like this:

String[] cmd = new String[4];

cmd[0] = "C:\\Programme\\Microsoft Office\\OFFICE11\\MSACCESS.EXE";

cmd[1]= "C:\\MyDB.mdb ";

cmd[2] = "/cmd";
cmd[3] = "parameter1 parameter2";

Runtime rt = Runtime.getRuntime();
Process proc = rt.exec(cmd);

However the access mdb startet but it seems not to take the parameter i want to put in to access.

Have anyone an Idea, what is wrong here?

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 2 2007
Added on Jan 22 2007
2 comments
152 views