Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Can Python merge with Java functionality?

Posted on 2014-07-26
2
Medium Priority
?
279 Views
Last Modified: 2014-07-29
Hi

In my project, I will create a certain class in Java to perform certain networking operations.
It will be an abstract class with a key method to be implemented in Java.

Is a Python .py code able to take a .class and interface with it? - To enforce implementation of this one method? Or must I port it?

Thanks
0
Comment
Question by:beavoid
2 Comments
 
LVL 29

Accepted Solution

by:
pepr earned 2000 total points
ID: 40221819
I cannot answer directly as I do not have first-hand experience, but there is Jython project (http://www.jython.org/) which is Python implemented in Java.

The wiki https://wiki.python.org/jython/WhyJython says:

- Ability to extend existing Java classes in Jython - allows effective use of abstract classes.

The classical Python (a.k.a. CPython) is implemented in the C language, and it is not capable to use Java classes the wanted way.
0
 

Author Closing Comment

by:beavoid
ID: 40227861
Perfect.
Thanks
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A set of related code is known to be a Module, it helps us to organize our code logically which is much easier for us to understand and use it. Module is an object with arbitrarily named attributes which can be used in binding and referencing. …
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question