473,386 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Call java jar from perl script

89
Hi,
I have to call ' java -jar name.jar arg1 arg2' in my perl script. The java prints a string if we invoke the above command How to capture this information.
Thanks and regards.
Feb 24 '11 #1

✓ answered by miller

Just use backticks to execute an external program and capture its results

perldoc: perlop #Quote Like Operators, Scroll down to "qx".

Expand|Select|Wrap|Line Numbers
  1. my $results = `java -jar name.jar arg1 arg2`;
  2.  

2 6690
miller
1,089 Expert 1GB
Just use backticks to execute an external program and capture its results

perldoc: perlop #Quote Like Operators, Scroll down to "qx".

Expand|Select|Wrap|Line Numbers
  1. my $results = `java -jar name.jar arg1 arg2`;
  2.  
Feb 24 '11 #2
lilly07
89
Hi miller,
Thanks for your response. This is something new that I have learnt.
Feb 24 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Wet Basement | last post by:
I am passing data to a putcart.pl , parsing it, then building the query string to put the item in the shopping cart: $cartStr =...
7
by: Danny | last post by:
Newbie here Thanks for the help with this command: print "Status: 204 No Content\n\n"; which returns nothing in a perl script. This is great because I just want my perl script to increment a...
6
by: Richard Trahan | last post by:
I want a js function to call a Perl script residing on a server. The Perl script will return a string, to be used by the js. Pseudo code: <script> stringvar = perlfunc_on_server(stringarg)...
1
by: David Meier | last post by:
Hi all, I am not a very skilled C programmer yet and I need the help of the list bad. OK, here is the problem: I have written a SIEVE module coded in C for the cyrus imapd mail server. This...
7
by: Wladimir Borsov | last post by:
I want to call a perl script myscript.pl in my cgi-bin from a HTML web page. This call should NOT use SSI (because in this case HTTPS://.... protocol is necessary). Furthermore NO button click...
4
by: benwylie | last post by:
I am running IIS 6.0 on Windows 2003. I would like to be able to run a perl script from a web page and include the output. I have tried doing it with an ssi: <form action='docsearch.shtml'...
4
by: jane007 | last post by:
Hello everybody: I am having a problem. On Unix platform, there is a script that need user to input data from console, then when I call Unix perl script from Windows, these is an issue occurs,...
3
by: vijayarl | last post by:
Hi all, i have perl script, which is used to send mail. its a command line utility. if we run this perl script in command line by passing all it's required arguments, it works very well.there no...
27
by: parashar123 | last post by:
There are two pl files: realtimechart.pl and realtimedemo.pl realtimechart generates a realtime graph which would an image file(png,gif,jpeg etc) and realtimedemo generates a html file alongwith...
3
by: rasmidas | last post by:
Hi, I have a perl script resides in my unix serve. I want to call that from inside a web-page. Please let me know, how can i make it possible?
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.