Accessing Python Code from Java

20 views
Skip to first unread message

Hammad Shuaib

unread,
May 31, 2021, 12:55:31 PM5/31/21
to Py4J Support and Comments
Hi,
I have to perform matrix multiplication in python and input source is java code. Now I am using Py4j gatewayServer for connecting Java to Python. Problem is in Protocol.getPythonProxy. It has 2 parameter.: 1) Command 2) Gateway. In command I am entering packagename.InterfaceName. It is successfully passed in Command Parameter but in getPythonProxy there is occuring Invalid interface name: exception resulting from ClassNotFoundException underReflectionUtil.classForName(parts[i]) method.

Can you please help me in identifying that where I am going wrong in entering interface name?

<dependency>
    <groupId>net.sf.py4j</groupId>
    <artifactId>py4j</artifactId>
    <version>0.10.4</version>
</dependency>
Reply all
Reply to author
Forward
0 new messages