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 6022895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:55:29+00:00 2026-05-23T03:55:29+00:00

Our programming model is like this: The c code is to capture the real-time

  • 0

Our programming model is like this:

The c code is to capture the real-time events(very frequent) of the system and java code runs as a server to receive the request. When there is an event captured by the c code, we need to send request to java code and wait for the reply. I have tried JNI to call java from c, but it seems that it will stuck after running for several seconds. JNI needs to initialize jvm and search the handler in the class file. Is there any better way to communicate between c and java? Can I compile java code into binary and link it with the c code?
Thanks

  • 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-05-23T03:55:30+00:00Added an answer on May 23, 2026 at 3:55 am

    You may want to look into using sockets if there is a nice producer-client/consumer-server paradigm involved. That way the C-code is running in the background and pushes info to the Java service over a socket connection, and the Java services in-turn sends replies back to the C-code. You could also look into using FIFO’s or named pipes for communication as well, but sockets, at least locally on a machine, tend to be pretty fast and efficient on most platforms.

    Also, the Java service can start-up the C-code on-launch if you need to work that way, or vice-versa (i.e, the C-code can fork off a VM and start the Java service).

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

Sidebar

Related Questions

Inside VS2005, our whole programming staff gets this error message sporadically and it is
Not sure this is a programming question, but we use LaTeX for all our
We have 2 new GIS programmer/analyst in our department (new to programming and ArcObjects)
Our team develops distributed winform apps. We use ClickOnce for deployment and are very
Our team is creating a new recruitment workflow system to replace an old one.
Our EPOS system copies data by compressing the database into a zip file, and
Our site has some very complicated form controls that are submitted and then show
I'm currently enrolled in a Client/Server Programming class (i.e. Java 2) in college. For
I was reading this excellent article which gives an introduction to Asynchronous programming here
I have a snippet to create a 'Like' button for our news site: <iframe

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.