Jochen Hoenicke wrote:
> 
> > libgcj has java.util.zip [...]
> 
> I would volunteer to port that package.  There are only two native
> files, so porting it to JNI should be simple.
> 
> For CNI vs. JNI: One could invent an intermediate language, that could
> be translated to CNI code or JNI code via a perl script.  Using the
> preprocessor alone (as Stuart suggested) seem impossible (CNI uses C++
> namespaces and classes like java::util::zip::Deflater::deflate, while
> JNI uses plain C identifier Java_java_util_zip_Deflater_deflate).

I like the perl approach. Although it might seem hacky, it means we can
design the meta-language as we want to, rather than using clunky
preprocessor directives. Even if it were possible to do it with the
preprocessor, but I know that I for one wouldn't enjoy programming in
the language that resulted!

I say go for it, and keep us updated on your progress:)

> Porting this package is probably a nice test for this technique.  What
> do you think about it?  If you don't want to rely on perl for
> compiling it would be simple to include the transformed classes in the
> distribution.

This sounds like a good plan... I never heard of a GNU/Linux system that
didn't include Perl, but certainly some other unixes don't.

Stuart.

Reply via email to