running jar file with multiple arguments in perl
        Posted  
        
            by compiler9999
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by compiler9999
        
        
        
        Published on 2010-05-29T16:10:34Z
        Indexed on 
            2010/05/29
            16:12 UTC
        
        
        Read the original article
        Hit count: 185
        
perl
Hi All,
Im trying to run a jar file. this jar file will output multiple question in console manner, i want to eliminate the console and i need to input a value in order to proceed. 
e.g :
A. Choose value 1 :
[1] Windows
[2] Unix
Input : 2 
B. Choose value 2 :
[1] Oracle
[2] DB2
Input : 1 
Im trying :
"java -jar program.jar < abc.txt" where 
abc.txt has a value of :
2
1
3
etc.
but its not working its only getting the first value.
please help. thanks.
btw, ive also try :
OPEN PIPE, "| java -jar program.jar";
 open (FH, /abc.txt)
 print PIPE "$res";
 close FH;
close PIPE;
Regards
© Stack Overflow or respective owner