S
S
senya_jan2019-05-31 10:34:58
Python
senya_jan, 2019-05-31 10:34:58

Is it possible to use classes from .jar file in python code?

There is a jar file.
I want to call methods from classes inside this jar file.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Gornostaev, 2019-05-31
@sergey-gornostaev

Not really, but there are a few workarounds:

  1. Use Jython .
  2. Use the Python/C API to write an extension that uses JNI to start a virtual machine and execute methods of interest.
  3. If the jar file is executable and you need the result of its work, you can run it like any other application.

F
Frozen Coder, 2019-05-31
@frozen_coder

I haven't tried it, but they say that the Holy Graal can unite the uncombinable

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question