i am trying to develop a j2se program that copy a .csv for special task.
Now i want to run(execute) that copied .csv file.
if copied paht is “C:\program files\reports\test.csv” or
C:\Documents and Settings\User\My Documents\test.csv” it dose not work for this code:
run.exec(“cmd start /c C:/Documents and setting\user\My Documents\test.csv”);
and for this code:
if path gets form a JTextField or JFileChooser, how is works?
note taht in during of running of this program users may set their special path.
thank u for your answer.
You should use the
Desktopclass introduced in Java 6 if possible:Less problems with separating commands, and it’s platform-independant.