LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-17-2011, 01:58 AM   #16
vdx
Member
 
Registered: Aug 2007
Location: The Greate INDIA
Distribution: CentOS, RHEL, Fedora
Posts: 102

Rep: Reputation: 24

Quote:
After this the executable seems to waiting for some input...

But all the parameters are already given in arg1.

If i execute this file(moses) from outside the application, it asks for input only in case when the paramters are not given properly.
When u run ur binary in command mode, it already having controlling terminal, So it can ask for parameters to input, But wen u run using java, it does not have its controlling terminal, So it may happn that ur prog get stuck. So kindly make sure that ur supplied parameters are correct.

Code:
String[] arg1 = { (1) "/bin/sh", 
                  (2) "-c",
                  (3) "/home/nakul/moses/mosesdecoder/trunk/moses-cmd/src/moses -f /home/nakul/moses/mosesdecoder/trunk/scripts/training/moses-scripts/scripts-20110405-1055/training/model/moses.ini",
                  (4) "-i",
                  (5) s22,
                  (6) "-v", 
                  (7) "2"
               };
In above code, U have array of strings, and the fifth argument s22 doesn't seem to a string.
(In this case u might be getting compile time error).

In addition,
Please post moses's output, what u get in command & java mode.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Developing StickyNote Application getBoa Programming 2 06-17-2010 03:44 PM
LXer: Developing a real-time Linux data acquisition application LXer Syndicated Linux News 0 08-21-2006 11:54 PM
Developing an application with scilab vrdhananjay Linux - Software 3 12-15-2005 05:26 PM
Developing web application desarrolladores Linux - General 3 06-23-2004 02:34 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration