0

I wanted to run this zipTransfer.pl perl program from within a function in Java

private void runZipTransfer() throws IOException {


Runtime.getRuntime().exec(new String[] {"C:\\Perl64\\bin", "C:\\Lazy\\zipTransfer.pl"});


}

When running my Java program, however, nothing happens! Where's the issue here?

2 Answers 2

1

You need to execute the perl interpreter:

Runtime.getRuntime().exec(new String[] {"C:\\Perl64\\bin\\perl.exe", "C:\\Lazy\\zipTransfer.pl"});
Sign up to request clarification or add additional context in comments.

1 Comment

Not sure what's really going on here..that's the location of my perl exe
0

Try:

Runtime.getRuntime().exec(new String[] {"perl", "C:\\Lazy\\zipTransfer.pl"});

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.