This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Other JSE/JEE APIs and the fly likes JNI:  Swing to PerL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "JNI:  Swing to PerL" Watch "JNI:  Swing to PerL" New topic
Author

JNI: Swing to PerL

Jesus Angeles
Ranch Hand

Joined: Feb 26, 2005
Posts: 2057
My front end needs to be done using java swing/awt. I am however, required, to reuse existing perl codes. Is JNI able to talk to Perl directly? Or JNI to c, then c will talk to perl (if that is possible).
Timothy Wall
Greenhorn

Joined: Sep 14, 2002
Posts: 14
Originally posted by Jesus Angeles:
My front end needs to be done using java swing/awt. I am however, required, to reuse existing perl codes. Is JNI able to talk to Perl directly? Or JNI to c, then c will talk to perl (if that is possible).


JNA will allow you to call directly into a DLL which exports a C-callable interface, so you could conceivably call into the perl interpreter.

Alternatively you could invoke a perl process via Runtime.exec and collect the results via the filesystem.
Jesus Angeles
Ranch Hand

Joined: Feb 26, 2005
Posts: 2057
Thanks for the tip.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JNI: Swing to PerL