Hi, I recently got this query for itext [1] that is maintained in Fedora by me. I've been asked to provide a "JNI subpackage" [2]. Unfortunately, I am not familiar with JNI.
This person wants to package pdftk [3], which is a c++ application. The original pdftk code contains an old version of itext and it links to it statically. Meanwhile, the old version of itext had licensing issues and it had been removed from Fedora almost 2 years ago. But these issues got resolved recently and I packaged itext for Fedora once again. Now the question is: Can we link pdftk dynamically to new itext we have on the system?
After some consultation in IRC, I've been told that JNI is not what we need in this case. And a suggestion came up: Apparently we can use GCJ to do this job. But this will require non-trivial hacking. Can anyone point me to some guidelines for this and/or give me a head-start?
Thanks, -oget
Refs:
[1] http://www.lowagie.com/iText/download.html [2] https://bugzilla.redhat.com/show_bug.cgi?id=471811 [3] http://www.pdfhacks.com/pdftk/
Hi Orcan,
On Tue, 2008-11-18 at 22:14 -0800, Orcan Ogetbil wrote:
After some consultation in IRC, I've been told that JNI is not what we need in this case. And a suggestion came up: Apparently we can use GCJ to do this job. But this will require non-trivial hacking. Can anyone point me to some guidelines for this and/or give me a head-start?
The program, pdftk, is a c++ program that uses gcj's CNI (not JNI) feature to call java classes. Here is some background information on CNI: http://gcc.gnu.org/onlinedocs/gcj/About-CNI.html
In principle you would only need to provide CNI headers for the itext classes (see gcjh) and a shared library build from the itext classes or jar file (see gcj). But it depends a bit on coordinating with the pdftk packager. Currently the pdftk build seems to just bundle all of itext and compile it into one big static library.
Cheers,
Mark
java-devel@lists.fedoraproject.org