[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now



Posted on 2000-04-12
Medium Priority
Last Modified: 2010-03-05
Can java interface be built for a perl program?Can an applet  be used as front end of a perl program?If it can be used, how?
I would appreciate if someone can answer this question
Question by:apaazue
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 2710319
just an user interface to take in user input then use those input as arguments to a perl program, and eventually return the result to the user via the Java interface/applet?
Sounds like html/CGI would be better.

supposedly you should be able to do system call with JDK2.

Lastly, since Java can interface with C or alike (as far as I know), you can at least compile your perl program into a C program...

Author Comment

ID: 2712067
But how to do system callas from java program??
LVL 25

Expert Comment

ID: 2714404
If you're talking about system calls in the normal sense, you can use the java.lang.Runtime class available since JDK 1.0.


public class SampleSystemCall {

  static void main(String args[]) throws java.io.IOException {


But as far as this question goes, to actually answer it with any kind of sense, we really need a better idea of what it is you're trying to do.
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 2716104
Am talking about UNIX environment where we get 'a.out'  files which we have to run on commandline. Will the above program work if we give the command
Runtime.getRuntime().exec("perl test.pl");
does the perl program test.pl get executed.  I tried it but it didn't work. I would appreciate if someone can help.
Thank u

Expert Comment

by:christopher sagayam
ID: 2717108
To make things very simple ( but not efficient)

Make a perl script like whatever.pl and DO all system calls using the PERL script

suppose the URL the PERL script is


Just GET the page using JAVA interface PROCESS the output from the page and then proceed to do whatever you want


Author Comment

ID: 2717170
Well! its not a web based application.  Just a program that uses perl due to its power in text manipulation. The issue is the input to the program should come from an interface preferably java.The perl scripts work fine when input is given directly to them but to make the interaction with the tool simple , i need an inetrface. Ihope it makes things much clear//
LVL 25

Accepted Solution

clockwatcher earned 400 total points
ID: 2717277
LVL 25

Expert Comment

ID: 2717293

Author Comment

ID: 2717513
Thanks a lot clockwatcher, i really appreciate it.  I think its the perfect source for me to look into for what ever doubts i will get in this subject.

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question