Results 1 to 4 of 4
Thread: Executing Perl!
- 12-11-2009, 04:36 PM #1
Member
- Join Date
- Nov 2009
- Posts
- 13
- Rep Power
- 0
Executing Perl!
Hello All!
I am new to java. i want to run my perl script from java. i dont know what mistake i am doing, i am not able to execute my perl script. i can call my perl script with two arguments. i am able to run it successfully when i made a batch file. i dont know why it is not working in java. following is the code.
try
{
pathn1 = "C:\\Program Files\\jambo\\gritchy\\kakae";
fname1 = alpine.wav ;
Process p = Runtime.getRuntime().exec("C:/perl/bin/perl.exe C:\\Perl\\scripts\\varm.pl \"pathn1\" fname1");
int fg = p.waitFor();
if (fg == 0)
{
loginfo("successfull");
}
else {
loginfo("failed");
}
}
catch(Exception e)
{
loginfo("Exception running varm");
}
Please help me
- 12-11-2009, 05:31 PM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,377
- Blog Entries
- 7
- Rep Power
- 17
Don't double post.
kind regards,
Jos
- 12-11-2009, 05:44 PM #3
Member
- Join Date
- Nov 2009
- Posts
- 13
- Rep Power
- 0
ok,Sorry Joash..i was just confused that if it could be better to put this problem infront of experts..
i will not do it agian.:)
-
Similar Threads
-
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 -
Use Perl function with java
By lenny in forum Advanced JavaReplies: 1Last Post: 08-07-2007, 06:25 AM


LinkBack URL
About LinkBacks

Bookmarks