Questions tagged [jcc]

C++ code generator of wrappers for Java libraries

JCC is a C++ code generator that produces a C++ object interface wrapping a Java library via Java's Native Interface (JNI). JCC also generates C++ wrappers that conform to Python's C type system making the instances of Java classes directly available to a Python interpreter.

When generating Python wrappers, JCC produces a complete Python extension module via the distutils or setuptools packages.

Welcome to JCC, PyLucene's code generator

32 questions
1
vote
0 answers

Python: Installing JCC on Windows

I'm trying to install PyLucene on a 64-bit Windows machine and the first thing I need to do is install JCC. On the installation page it says I need to change the INCLUDES, CFLAGS, DEBUG_CFLAGS, LFLAGS and JAVAC values in the setup.py file. I have…
1
vote
0 answers

Trouble installing JCC (required for pylucene) on mac

I am following closely the installation guide for pylucene. I am unable to get past the first step, which requires installing JCC. To install JCC the instructions briefly note that mac users will need to: Edit setup.py and review that values in…
1
vote
1 answer

Including system classes in JCC module

I have a java class, Prime, which I have successfully 'compiled' into a python module with jcc with this command: sudo python -m jcc --jar ../workspace/prime.jar --python prime --build --install Prime.factorLists returns a multidimensional array;…
Jakob Weisblat
  • 7,450
  • 9
  • 37
  • 65
1
vote
1 answer

Creating nd JArray with jcc from numpy array

I have some java classes (not written by me) that I'm trying to access from python. I have succesfully compiled them with JCC and can access the methods without any problem. I can call a method requiring a numpy 1D array (or a list, which are the…
user3032683
1
vote
2 answers

How can specifying the absolute path $ /usr/bin/python have a different result than $ python when its aliased to the same path?

I'm trying to make PyLucene which has a required dependency JCC. (JCC is a code generator for calling Java from Python.) Note: OS is Mac OS X 10.7.4. The included make script runs: $ /usr/bin/python -m jcc output: /usr/bin/python: No module named…
Taylor D. Edmiston
  • 12,088
  • 6
  • 56
  • 76
0
votes
1 answer

How to match all rows if SQL :parameter is 'ALL' in DB2 JDBC?

This is just a sample code to reproduce the error SELECT * FROM ( VALUES (10,'A'),(20,'B'),(30,'C'),(40,'D') ) AS T(COL1,COL2) WHERE T.COL2 = :PARAM OR :PARAM = 'ALL' The above statement should return the first row if 'A' is assigned to PARAM…
0
votes
2 answers

Pylucene installation on MacOs with adoptopenjdk / Java8

I am trying to install JCC (as part of the installation of PyLucene) and I encountered several issues with it. The python version I use is 3.7, and I have installed adoptopenjdk-8.jdk using brew cask (since Java-8 is no longer available without…
HDolev
  • 193
  • 1
  • 9
0
votes
1 answer

JCC installation: Java JDK dictionary does not exist

I have installed the source code for PyLucene which contains the JCC source code. When trying to run python setup.py build in the JCC directory I receive the following error: Java JDK directory 'c:/Program Files/Java/jdk1.6.0_18' does not…
guruman
  • 25
  • 6
0
votes
1 answer

Issue with installing PyLucene 6.5.0 on Linux

I recently moved to python3, so I'm trying to install the recent version of Pylucene (version 6.5.0) which is compatible with python3. jcc3/sources/jcc.cpp: In function ‘PyObject* t_jccenv_strhash(PyObject*, PyObject*)’: jcc3/sources/jcc.cpp:214:27:…
amin
  • 445
  • 1
  • 4
  • 14
0
votes
1 answer

PyLucene JCC: implement a Java interface in python and receive Java thread callbacks through it

I'm playing around with my new toy, JCC 2.21, and am having trouble implementing callbacks in a python script. I have wrapped the following simple Java thread API and am calling it from python 2.7 (CPython), but when I call the…
predi
  • 5,528
  • 32
  • 60
0
votes
1 answer

How to cast variables in python with jcc

In java it is possible to cast an object onto a class. An good example is found here Object aSentenceObject = "This is just a regular sentence"; String aSentenceString = (String)aSentenceObject; I have a program that needs to integrate some java…
kslote1
  • 720
  • 6
  • 15
0
votes
1 answer

Problems with installing jcc and pylucene

I'm trying to install pylucene on Windows XP. I installed JDK on C:\Programme\Java\jdk1.6.0_18 . I also installed Visual Studio C++ Express to have a C++ compiler. As first step I'm trying to integrate jcc into python2.6 through the command:…
Christian
  • 25,249
  • 40
  • 134
  • 225
0
votes
1 answer

Problems with installing JCC on Mac OS

I want to use Pylucene, which requires instal JCC first. When I run python setup.py build, it stopped by an error as follows: found JAVAFRAMEWORKS = /System/Library/Frameworks/JavaVM.framework Loading source files for package…
vancexu
  • 1,548
  • 3
  • 19
  • 30
0
votes
1 answer

SIGSEGV: Segmentation Fault in JCC Library Code

I'm using the JCC Python-Java bridge and for the most part it works. However, I'm getting the following error: JRE version: 7.0_17-b02 Java VM: Java HotSpot(TM) Client VM (23.7-b01 mixed mode linux-x86 ) Problematic frame: C …
0
votes
2 answers

Pylucene in Python 2.6 + MacOs Snow Leopard

Greetings, I'm trying to install Pylucene on my 32-bit python running on Snow Leopard. I compiled JCC with success. But I get warnings while making pylucene: ld: warning: in build/temp.macosx-10.6-i386-2.6/build/_lucene/__init__.o, file is not of…
jbastos
  • 1,217
  • 1
  • 12
  • 19