Results 1 to 3 of 3
- 04-09-2012, 05:27 PM #1
Member
- Join Date
- Apr 2012
- Posts
- 2
- Rep Power
- 0
how to run the perl script on mac terminal using java program
perl -w /Users/santoshk/Documents/compare.pl /Users/santoshk/Documents/Actual /Users/santoshk/Documents/Expected /Users/santoshk/Documents/Difference
I have to pass above parameters to run the script, Above command worked well if i open the terminal manually and run the command. i have to write the java code to run the above command on terminal.I have tried with following code but it did not generate the expected output.
Runtime run = Runtime.getRuntime();
Process p=run.exec("perl -w /Users/santoshk/Documents/compare.pl" /Users/santoshk/Documents/Actual /Users/santoshk/Documents/Expected /Users/santoshk/Documents/Difference");
please let me know how i can run the command
- 04-09-2012, 06:38 PM #2
Re: how to run the perl script on mac terminal using java program
Go through all four pages of When Runtime.exec() won't and apply the knowledge you gain there.
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 04-10-2012, 11:58 AM #3
Member
- Join Date
- Apr 2012
- Posts
- 2
- Rep Power
- 0
Similar Threads
-
Launching perl script from Java thread
By Looserette in forum Threads and SynchronizationReplies: 7Last Post: 02-25-2011, 08:10 PM -
calling a perl script in Java(using a OK Button)
By Yaya B in forum NetBeansReplies: 1Last Post: 01-07-2011, 07:20 AM -
Perl in Java!
By hakan123 in forum New To JavaReplies: 5Last Post: 12-11-2009, 07:05 PM -
[B] How to call Perl script from Java [/B]
By JavaEmpires in forum Advanced JavaReplies: 7Last Post: 12-19-2008, 03:10 PM -
run perl script from java
By maheshmhs in forum New To JavaReplies: 0Last Post: 12-19-2008, 12:40 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks