File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Calling Java Methods in a windows java service Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Calling Java Methods in a windows java service" Watch "Calling Java Methods in a windows java service" New topic
Author

Calling Java Methods in a windows java service

Davie Lang
Greenhorn

Joined: Feb 06, 2004
Posts: 6
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.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12756
    
    5
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
 
 
subject: Calling Java Methods in a windows java service
 
Similar Threads
Installation of jre on windows XP is possible ?
Simple RegularExpressions in Ant
question about argument passing
Compile a Java EE source code
need help to run my application without windows logon