Questions tagged [jpype]

JPype is an effort to allow python programs full access to java class libraries

JPype is an effort to allow python programs full access to java class libraries

See http://jpype.sourceforge.net/

170 questions
3
votes
1 answer

check connection jpype - java

Is there a way to check the connection between jpype and java other than a print statement? I have installed jpype in anaconda (Windows 10 64bit, anaconda python27 (64bit) and jpype from the anaconda cloud). I can import jpype and create javaclasses…
D.Vrebos
  • 31
  • 1
3
votes
1 answer

JPype (Python): importing folder of jar's

i am using JPype in order to work with java classes in python. I have a folder that contains multiple self-written .jar files. I know how to import multiple .jar's on the long way: ... CLASSPATH =…
ysfaran
  • 5,189
  • 3
  • 21
  • 51
3
votes
2 answers

Different / better approaches for calling python function from Java

I am quite new to python and am trying to call python's function from java. My primary requirements are these: call should be transparent, in the sense that it should not require modifying .py file simply to enable it to be called from java. I…
Mahesha999
  • 22,693
  • 29
  • 116
  • 189
3
votes
1 answer

Practical use of Java class/JAR in Python?

I spent significant amount of time looking for this and explore many solutions. This is related to this thread. Calling Java from Python In the end, after testing: Pyjnius : Cannot install in Windows. Py4J: can install on windows, but using Gateway…
user5497885
3
votes
0 answers

Using Scala from Python with JPype

I have a system where I call a Java Program from Python via JPype. I'd like to switch my Java code to Scala. For example, I had: package jnets; class JVector{ double [] x; public JVector(double[] vec){ this.x = vec; } …
Peter
  • 12,274
  • 9
  • 71
  • 86
3
votes
3 answers

JPype and JayDeBeAPI returns jpype._jclass.java.lang.Long

I'm using JayDeBeAPI in PySpark (the Apache Spark Python API), and here's the beginning of my code (note, I'm actually running all this through an interactive shell with PySpark). import jaydebeapi import jpype conn =…
Alaa Ali
  • 896
  • 1
  • 12
  • 24
3
votes
2 answers

JPype : fatal error: 'jni.h' file not found

Hello I am trying to install JPype-0.5.4.2 using: python setup.py install And I get the following error: In file included from src/native/common/jp_array.cpp:17: src/native/common/include/jpype.h:45:10: fatal error: 'jni.h' file not found #include…
user1855165
  • 289
  • 1
  • 8
  • 22
3
votes
2 answers

Using JPype - How can I access JDBC Meta Data Functions

I'm using JayDeBeAPI which uses JPype to load FileMaker's JDBC driver and pull data. But I also want to be able to get a listing of all tables in the database. In the JDBC documentation (page 55) it lists the following functions: The JDBC client…
Greg
  • 45,306
  • 89
  • 231
  • 297
3
votes
1 answer

Python egg that makes Java calls to a running Java application

I am making a proposal for a Python adapter to the Oracle NoSQL Database. The Oracle NoSQL Database runs as a stand alone java application, and at least in a Java program, you interface with it by telling your program the hostname and port to…
CorayThan
  • 17,174
  • 28
  • 113
  • 161
3
votes
0 answers

Python Java Integration

I'm developing a program completely written in Python but I need to integrate a Java code inside the file console.py. I want to integrate Sphinx4's program to give GNS3 the capability of voice recognition. Is it possible? What do I need to do this?
karensantana
  • 1,599
  • 4
  • 21
  • 34
3
votes
2 answers

Jpype: "Can't start the AWT because Java was started on the first thread."

I'm using Jpype to use a java class into a python script. The java class involves the use of AWT library: and this seems to be the problem. This the python script: import jpype import os.path import threading jarpath =…
joker
  • 106
  • 1
  • 5
2
votes
2 answers

excute .jar file from python

Im trying to access server data via a jar-file. Doing this in MATLAB is quite simple: javaaddpath('*PATH*\filename.jar') WWS=gov.usgs.winston.server.WWSClient(ip,port); Data = eval('WWS.getRawData(var1,var2,var3)'); WWS.close; Problem is that I…
2
votes
2 answers

Python: JDBC Connection Error using JayDeBeApi

I'm facing an error while running following code. Please help me solving this issue or suggest an alternative way to connect Vertica server via JDBC. I have also tried connecting using pyspark. But with pyspark we are not able to execute sql query…
user5828964
  • 302
  • 2
  • 10
2
votes
3 answers

jpype.getDefaultJVMPath() fails when I try accessing JVM from python3

I am currently using Python3, java8, jpype 0.6.3 version on windows10. jpype.getDefaultJVMPath() fails with an error : raise JVMNotFoundException("No JVM shared library file ({0}) " jpype._jvmfinder.JVMNotFoundException: No JVM shared library file…
Ornella
  • 21
  • 1
  • 3
2
votes
1 answer

cannot find jpype even after successful installation

I tried to install jpype by pip as follows sudo pip3 install JPype1-py3 but, I received a bunch of errors; the screenshot is attached. Click hereThen I installed manually that package, and when I run, it says: (the screenshot is also attached…
umka
  • 21
  • 2
1
2
3
11 12