I tried to open outlook on user pc but because the app in the windows server its run the cmd on the server and not in user pc.
this is the code:
ProcessBuilder pb = new ProcessBuilder();
pb.command("cmd.exe", "/C", "start", "outlook.exe",
"/eml", resultEmail.getCanonicalPath());
Process p = pb.start();
try {
p.waitFor();
} finally {
p.getErrorStream().close();
p.getInputStream().close();
p.getErrorStream().close();
p.destroy();
}
and one more thing when i create the eml file like this:
File resultEmail = File.createTempFile("test", ".eml");
its create on temp directory of the server and not of user pc.
what can i do to run outlook with java and open eml file in user pc and not in the server ?