Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
My humble greetings, monks,
I am trying to automate a command-line Java application (Project X to be exact), and am trying to use the secure form of system() or pipe from it. However, when I do that, I am merely greeted with an error from Java:
Failed to load Main-Class manifest attribute from ~/src/Project-X_0.91.0/ProjectX.jarHere's what I am trying:
# works system("java -jar ~/src/Project-X_0.91.0/ProjectX.jar -demux"); # doesn't work system(qw#java -jar ~/src/Project-X_0.91.0/ProjectX.jar -demux#); # doesn't work open($fh, '-|', qw#java -jar ~/src/Project-X_0.91.0/ProjectX.jar -demu +x#); print while (<$fh>); close $fh;
What could be the cause of difference in execution? The Java I'm using is GCJ version 4.4.5, for what it is worth.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: What should I know about "secure" system()?
by Anonymous Monk on Apr 18, 2012 at 17:39 UTC | |
|
Re: What should I know about "secure" system()?
by Riales (Hermit) on Apr 18, 2012 at 17:30 UTC | |
by Anonymous Monk on Apr 18, 2012 at 19:34 UTC |