> Isn't directory() a method in ProcessBuilder class...
The correct statement is:
pb.directory(new File("C:\\Program Files\\Crystal Decisions\\Crystal
Reports 9"));
> Also, how do I define the directory for the file "myreport.rpt"...
Depends of what you want to achieve.
Must your program be executed where the 'myreport.rpt' is located?
If so then you should have 'C:\My Reports' as working directory and do:
ProcessBuilder pb = new ProcessBuilder("C:\\Program Files\\Crystal
Decisions\\CrystalReports 9\\crw32.exe", "myreport.rpt");
pb.directory("C:\\My Reports");
Or maybe you want your program be executed in the software folder.
If that case you should have 'C:\Program Files\Crystal
Decisions\Crystal Reports 9' as working directory and do:
ProcessBuilder pb = new ProcessBuilder("crw32.exe", "C:\\My
Reports\\myreport.rpt");
pb.directory("C:\\Program Files\\Crystal Decisions\\CrystalReports 9");
Regards
minjie@excite.com - 16 Mar 2006 23:50 GMT
> > Isn't directory() a method in ProcessBuilder class...
>
[quoted text clipped - 21 lines]
>
> Regards
Hello Jean-Francois, thank you very much! pb.directory(new File("..."))
worked! I tried both methods in your examples. They both worked. I
guess for my application, I'll use your first example (i.e., use C:\My
Reports as working dir).