如何从 Java 执行外部程序?
可能重复:
我想从 Java 执行 Perl 程序。
获取带有参数的文件名并执行程序,Perl 程序输出结果文件。
所以这是JAVA的程序方面
- 我指定一个参数并执行Perl程序
- Perl程序读取我吐出的文件
2)检查文件的存在并且似乎能够做到这一点,但是1)可能? ActivePerl 随当前机器一起安装。我在 Eclipse 上开发 Java。
Possible duplicates:
I want to execute a program of Perl from Java.
I take a file name with an argument and carry out a program, and the program of Perl outputs a result file.
So it is the program side of the JAVA
- I appoint an argument and carry out Perl program
- Perl program reads the file which I spitted out
2) checks the existence of the file and seems to be able to do it, but will 1) be possible? ActivePerl is installed with the present machine. I develop Java on Eclipse.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用:
参考:执行命令
仅供参考:该链接包含以下示例带参数的命令,也带空格。
Use:
Reference:Executing a Command
FYI: The link contains examples of commands with arguments, and with spaces too.