By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,727 Members | 766 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,727 IT Pros & Developers. It's quick & easy.

Exange of informations and objects between PERL and JAVA

P: n/a
Hi all,

I would like having more informations on how we could exchange
informations and/or objects between PERL and JAVA.

We have a Java programs that open, maintain and close telnet
connections, for PERL scripts...

Is it possible, to echange the Java telnet session object to PERL
programs ? Or thoses two languages could not exchange objects or such
structure ?

If it's not possible, how could I exchange textual informations
between a Java program and a PERL script on the same UNIX computer ?
Socket, Pipe,... ?

Or mayby, there is another solution ?

Thanks a lot for your help.

Best regards.

Lionel.
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On 23 Aug 2004 03:51:00 -0700, Lionel wrote:
I would like having more informations


<http://google.com/groups?as_ugroup=comp.lang.java.*&as_usubject=PERL %20JAVA%20exchange>

That is obvious from the excessive
cross-posting to the groups..
comp.lang.java,
comp.lang.java.api,
comp.lang.java.developer,
comp.lang.java.help,
comp.lang.java.misc
...most of which are invalid.

As well as to the multi-posted messages to
comp.lang.java.programmer and comp.lang.java.tech.

Please
a) do not cross post.
<http://www.physci.org/codes/javafaq.jsp#xpost>
b) do not mutli-post
<http://www.physci.org/codes/javafaq.jsp#xpost>
c) choose the single group to which you post
from a list of valid groups, such as..
<http://www.physci.org/codes/javafaq.jsp#groups>

*Note*, follow-ups set to the only appropriate
group in this circumstance, c.l.j.help..

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
Jul 17 '05 #2

P: n/a
Lionel wrote:
I would like having more informations on how we could exchange
informations and/or objects between PERL and JAVA.

We have a Java programs that open, maintain and close telnet
connections, for PERL scripts...

Is it possible, to echange the Java telnet session object to PERL
programs ? Or thoses two languages could not exchange objects or such
structure ?

If it's not possible, how could I exchange textual informations
between a Java program and a PERL script on the same UNIX computer ?
Socket, Pipe,... ?

Or mayby, there is another solution ?


You could, maybe, use a FIFO. If the Java application is getting data
via telnet and then using the Perl script to parse the data, you could
just write to a FIFO from the Java application and let the Perl script
read the data coming into the FIFO. This, of course, opens up a host of
issues (such as the fact a FIFO isn't like a regular file, so reading
isn't done the same way as with a regular file - it's done with an
infinite loop).

Just a question for you to ponder .... why not just use one or the other
language? Regular expressions were introduced to Java in version 1.4
and Perl has the Net::Telnet module to open, read, and close telnet
connections. Seems like a lot of extra work if you have the question
you have asked. :-)

HTH

Jim
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.