Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
java.lang.Runtime.exec fails on Mac
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="kamalsofteng" data-source="post: 824241" data-attributes="member: 93939"><p>Hi folks;</p><p>I am developing a java program that needs to run commands as if it were from command line. I have a binary in /Applications/LabPrints/Image Aligner/LabPrints.dalp</p><p>and when I run it from command line, it runs but when I try to run it form Java with</p><p>[CODE]String cmd="\"/Applications/LabPrints/Image Aligner/LabPrints.dalp\"";</p><p>Runtime.exec(new String[]{cmd});[/CODE]</p><p>I get an error with the output:</p><p></p><p></p><p></p><p>Does anyone has any idea what I am missing? I am running the same on PC and it runs perfectly. I am also capturing the output and error streams of the created process in separate threads. </p><p></p><p>Thanks in advance...</p><p>Kamal</p></blockquote><p></p>
[QUOTE="kamalsofteng, post: 824241, member: 93939"] Hi folks; I am developing a java program that needs to run commands as if it were from command line. I have a binary in /Applications/LabPrints/Image Aligner/LabPrints.dalp and when I run it from command line, it runs but when I try to run it form Java with [CODE]String cmd="\"/Applications/LabPrints/Image Aligner/LabPrints.dalp\""; Runtime.exec(new String[]{cmd});[/CODE] I get an error with the output: Does anyone has any idea what I am missing? I am running the same on PC and it runs perfectly. I am also capturing the output and error streams of the created process in separate threads. Thanks in advance... Kamal [/QUOTE]
Verification
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
java.lang.Runtime.exec fails on Mac
Top