hello everybody,
i have a java application, that should mount a smb-drive via applescript.
i use the following code:
but it doesn't work. an error is written to stderr
if i print script and copy-paste it to the terminal it works as expected...
what am I doing wrong?
confusion
i have a java application, that should mount a smb-drive via applescript.
i use the following code:
Code:
...
StringBuffer script = new StringBuffer();
script.append("\'tell application \"Finder\" to mount volume \"smb:/");
script.append(ip);
script.append("/MyShare\"\'");
String[] cmd = {"osascript", "-e", script.toString()};
try {
Runtime rt = Runtime.getRuntime();
Process proc = rt.exec(cmd);
...
but it doesn't work. an error is written to stderr
Code:
0:1: syntax error: A unknown token can't go here. (-2740)
if i print script and copy-paste it to the terminal it works as expected...
what am I doing wrong?
confusion