由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - question for java runtime.exec
相关主题
Default function template argumentserror while building gcc
ajax小问题一个简单的问题
question about using Hive parameter (转载)A C++ runtime type casting question
any php experts?IDL一问
Google Glass sales halted but firm says kit is not dead人无食不活,码无库不通
*** help needed! on MATLAB GUI ***如何循环播放一个mp3文件中的某一段?
how to get runtime caller function?[合集] 请问关于堆栈的问题
请教一个C++有关的编译问题关于 exception 的一个问题
相关话题的讨论汇总
话题: acrobat话题: adobe话题: parameters话题: macos
进入Programming版参与讨论
1 (共1页)
c*******9
发帖数: 6411
1
I tried the following java code on MAC, I am able to compile and run, there
is no error message, but the acrobat does not launch the pdf file. I try the
get the exit value for the process, it is 213.
Any ideas why the acrobat does not launch, how to make it work?
thanks..
Runtime runtime = Runtime.getRuntime();
String[] parameters = new String[2];
parameters[0] = "/Applications/Adobe Acrobat 9 Pro/Adobe Acrobat Pro.app/
Contents/MacOs/AdobeAcrobat";
parameters[1] = "/home/test.pdf";
launchedProcess = runtime.exec( parameters );
X****r
发帖数: 3557
2
Try launch it manually from your terminal using the exact same
arguments. Does that work?

there
the

【在 c*******9 的大作中提到】
: I tried the following java code on MAC, I am able to compile and run, there
: is no error message, but the acrobat does not launch the pdf file. I try the
: get the exit value for the process, it is 213.
: Any ideas why the acrobat does not launch, how to make it work?
: thanks..
: Runtime runtime = Runtime.getRuntime();
: String[] parameters = new String[2];
: parameters[0] = "/Applications/Adobe Acrobat 9 Pro/Adobe Acrobat Pro.app/
: Contents/MacOs/AdobeAcrobat";
: parameters[1] = "/home/test.pdf";

c*******9
发帖数: 6411
3
thanks
I try "/Applications/Adobe Acrobat 9 Pro/Adobe Acrobat Pro.app/Contents/
MacOs/AdobeAcrobat" in the command line, it does not give me any error but
the applicaton is not launch, when I get to the MacOs directory and try
AdobeAcrobat, it does launch.
maybe it is the space in the directory. but I am not sure how to work
around.
g*****g
发帖数: 34805
4
Try put a "\" before space, and you'll need two for java string.
I don't have any experience with Mac. But on linux I'll always
put the command in a shell script and call the script instead,
more flexible and less error prone.

but

【在 c*******9 的大作中提到】
: thanks
: I try "/Applications/Adobe Acrobat 9 Pro/Adobe Acrobat Pro.app/Contents/
: MacOs/AdobeAcrobat" in the command line, it does not give me any error but
: the applicaton is not launch, when I get to the MacOs directory and try
: AdobeAcrobat, it does launch.
: maybe it is the space in the directory. but I am not sure how to work
: around.

c*******9
发帖数: 6411
5
Thanks
I try
"/Applications/Adobe\ Acrobat\ 9\ Pro/Adobe\ Acrobat\ Pro.app/Contents/
MacOs/AdobeAcrobat" in the command line, it complains can not find file or
directory.
also try use \, not working neither...

【在 g*****g 的大作中提到】
: Try put a "\" before space, and you'll need two for java string.
: I don't have any experience with Mac. But on linux I'll always
: put the command in a shell script and call the script instead,
: more flexible and less error prone.
:
: but

1 (共1页)
进入Programming版参与讨论
相关主题
关于 exception 的一个问题Google Glass sales halted but firm says kit is not dead
急问,有哪位面过微软SDET的大哥啊!能否帮一下小弟!*** help needed! on MATLAB GUI ***
strcat()how to get runtime caller function?
help abt C++请教一个C++有关的编译问题
Default function template argumentserror while building gcc
ajax小问题一个简单的问题
question about using Hive parameter (转载)A C++ runtime type casting question
any php experts?IDL一问
相关话题的讨论汇总
话题: acrobat话题: adobe话题: parameters话题: macos