Can I compile the java code in something like a dll to use inside the Python code, and use this before in a pyinstaller compiled program?

76 views Asked by At

I want to use a Java project inside Python, I read that some Python libraries do it. But my question is it: If I do it, can I compile before all the code with pyinstaller or can I compile the java code in something like a dll to use inside the Python code, and use this before in the compiled program?

If somebody can reply, I have another doubt too, if don't have a way to do it with Java, have a way with another language, like PHP?

EDITED:

Send me to this question, but its out of date... I try to use the first answer, ikvm, but I receive this error because the version of java:

ikvm-7.2.4630.5\bin>ikvmc -target:library -out:nfe-4.0.30.dll -recurse:./nfe-4.0.30.jar

Warning IKVMC0108: not a class file "cc/mallet/util/tests/TestPriorityQueue$1.class", including it as resource (class format error "51.0")

source

Because the tip from @StephenC, I try to change the command:

ikvmc -target:1.7 -out:nfe-4.0.30.dll -recurse:./nfe-4.0.30.jar

I receive this error:

fatal error IKVMC5009: Invalid value '1.7' for -target option

EDITED 09/05:

The links don't help me to convert the library to Python. I don't know Java, and don't know what the Java version from the project that I provided. Please, if somebody know a updated way to convert newest Java libraries to Python, I thank.

0

There are 0 answers