• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Tim Cooke
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
Saloon Keepers:
  • Piet Souris
Bartenders:

Calling Java Methods in a windows java service

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to be able to allow a C programme to interface with my Java Service.

I know I can use the JNI to allow the C programme to talk to Java, but how can I get the C programme to talk to Java if it is running as a windows java service?

Thanks in advance for any advice.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This sounds like a job for socket communication. Your Java program can establish a java.net.ServerSocket and listen for requests from the C program. Once a connection is established, start a Thread to accept the data from the C program, process it and return the result.
I believe we have a whole forum here for socket related programming.
Bill
reply
    Bookmark Topic Watch Topic
  • New Topic