File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 2053
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: 2053
Thanks for the tip.
 
wood burning stoves
 
subject: JNI: Swing to PerL