This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft 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 Java 8 in Action this week in the Java 8 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: 2046
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: 2046
Thanks for the tip.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JNI: Swing to PerL
 
Similar Threads
Calling Java Methods in a windows java service
JSF + JBoss Seam [will appreciate any feedback]
Calculation of CPU load
JBuilder and required projects
Service Status