Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Perl + Java

Reply
Thread Tools

Perl + Java

 
 
corrieknor@hotmail.com
Guest
Posts: n/a
 
      01-18-2007
Is it possible to call a java program from within my perl code and use
the return value from the java program in my perl program?

Thanks in advance
Corrie

 
Reply With Quote
 
 
 
 
corrieknor@hotmail.com
Guest
Posts: n/a
 
      01-18-2007
Also: The Perl script should parse a paramter to the Java application

 
Reply With Quote
 
 
 
 
Paul Lalli
Guest
Posts: n/a
 
      01-18-2007
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> Is it possible to call a java program from within my perl code and use
> the return value from the java program in my perl program?


Yes.

perldoc -f system

Paul Lalli

 
Reply With Quote
 
xhoster@gmail.com
Guest
Posts: n/a
 
      01-18-2007
"Paul Lalli" <(E-Mail Removed)> wrote:
> (E-Mail Removed) wrote:
> > Is it possible to call a java program from within my perl code and use
> > the return value from the java program in my perl program?

>
> Yes.
>
> perldoc -f system


Or Inline::Java

Xho

--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
 
Reply With Quote
 
krakle@visto.com
Guest
Posts: n/a
 
      01-18-2007


On Jan 18, 10:08 am, Michele Dondi <(E-Mail Removed)> wrote:
> On 18 Jan 2007 05:06:04 -0800, (E-Mail Removed) wrote:
>
> >Is it possible to call a java program from within my perl code and use
> >the return value from the java program in my perl program?Yes. More precisely you can use system() to run a program regardless

> of the language it is written in, and inspect its return value to find
> the exit status - remember that you will have to shift it right by
> eight for the actual one.
>
> Michele


Isnt system somewhat of an expensive call?

 
Reply With Quote
 
J. Gleixner
Guest
Posts: n/a
 
      01-19-2007
(E-Mail Removed) wrote:
>
> On Jan 18, 10:08 am, Michele Dondi <(E-Mail Removed)> wrote:
>> On 18 Jan 2007 05:06:04 -0800, (E-Mail Removed) wrote:
>>
>>> Is it possible to call a java program from within my perl code and use
>>> the return value from the java program in my perl program?Yes. More precisely you can use system() to run a program regardless

>> of the language it is written in, and inspect its return value to find
>> the exit status - remember that you will have to shift it right by
>> eight for the actual one.
>>
>> Michele

>
> Isnt system somewhat of an expensive call?
>

It's on sale this week and this week only.
 
Reply With Quote
 
Charlton Wilbur
Guest
Posts: n/a
 
      01-19-2007
>>>>> "k" == krakle <(E-Mail Removed)> writes:

k> Isnt system somewhat of an expensive call?

It's probably a safe bet that someone invoking Java from Perl is not
likely to be terribly concerned with the overhead of system().

Charlton


--
Charlton Wilbur
(E-Mail Removed)
 
Reply With Quote
 
corrieknor@hotmail.com
Guest
Posts: n/a
 
      01-19-2007

Michele Dondi wrote:
> On 18 Jan 2007 06:26:40 -0800, (E-Mail Removed) wrote:
>
> >Also: The Perl script should parse a paramter to the Java application

>
> What does this mean?
>
>
> Michele
> --

The perl script should call the java appl. with a parameter. This
parameter is used in the Java appl. to look something up and return
this to the perl scripy

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FAQ 1.4 What are Perl 4, Perl 5, or Perl 6? PerlFAQ Server Perl Misc 0 02-27-2011 11:00 PM
FAQ 2.17 What is perl.com? Perl Mongers? pm.org? perl.org? cpan.org? PerlFAQ Server Perl Misc 0 02-03-2011 11:00 AM
FAQ 1.4 What are Perl 4, Perl 5, or Perl 6? PerlFAQ Server Perl Misc 0 01-23-2011 05:00 AM
Perl Pro but Java Newbie: Need nudge in proper direction for myfavorite Perl routine in Java /usr/ceo Java 32 09-15-2008 12:12 AM
Perl Help - Windows Perl script accessing a Unix perl Script dpackwood Perl 3 09-30-2003 02:56 AM



Advertisments