Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8100157
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:40:11+00:00 2026-06-05T22:40:11+00:00

I want to be able to call certain methods and such that are contained

  • 0

I want to be able to call certain methods and such that are contained in a Java jar that is already running (It is guaranteed that it will be running). I have found things like Jython, but those only seem to be able to access Java’s native classes and such.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T22:40:13+00:00Added an answer on June 5, 2026 at 10:40 pm

    Check out this: Calling Java from Python

    “You could also use Py4J. There is an example on the frontpage and lots of documentation, but essentially, you just call Java methods from your python code as if they were python methods:

    from py4j.java_gateway import JavaGateway
    

    gateway = JavaGateway() # connect to the JVM

    java_object = gateway.jvm.mypackage.MyClass() # invoke constructor

    other_object = java_object.doThat()

    other_object.doThis(1,’abc’)

    gateway.jvm.java.lang.System.out.println(‘Hello World!’) # call a static method

    As opposed to Jython, one part of Py4J runs in the Python VM so it is always “up to date” with the latest version of Python and you can use libraries that do not run well on Jython (e.g., lxml). The other part runs in the Java VM you want to call.

    The communication is done through sockets instead of JNI and Py4J has its own protocol (to optimize certain cases, to manage memory, etc.)“

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a winforms baseform that contain calls to certain methods that need to
I have a situation that requires me to call a certain controller when a
Summary I want to be able to call a JavaScript function from a Flex
I want my app to be able to tell whether a call was missed,
I want to stop outgoing call and open the application. The app is able
I want to be able to invoke an SSIS package at will from a
I want to be able to apply certain rules to the products added to
Using Moq, I'd like to be able to verify that certain conditions are met
I have a jqGrid with only certain columns that are editable and I would
I have a class that interfaces with an RPGLE program. The client will hold

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.