Hi,

I'm trying to use JCC to access Java libraries from python, as this seems
to be its stated purpose. (Any known use outside of pylucene?)

I get that all classes are flattened by default, and in some cases
`--rename` becomes unpractical in no time.
`--use_full_names` works, but then how to use the resulting module?

Let's translate the example there to use full names:
https://jcc.readthedocs.io/en/latest/

python3.6 -m jcc \
    --jar boilerpipe-1.2.0.jar \
    --classpath lib/nekohtml-1.9.13.jar \
    --classpath lib/xerces-2.9.1.jar \
    --package java.net \
    java.net.URL \
    --use_full_names \
    --python boilerpipe2 --build --install


import boilerpipe2 as boilerpipe
jars = ':'.join(('lib/nekohtml-1.9.13.jar', 'lib/xerces-2.9.1.jar'))
boilerpipe.initVM(boilerpipe.CLASSPATH+':'+jars)

Now what?
findClass() sounds useful. Looking at the source it seems to work thus:
boilerpipe.findClass('java/net/URL')

No idea past this point.

Thanks,
Philippe

Reply via email to