tags:

views:

1127

answers:

2

A third-party application reads some Java code from an XML file, and runs it when a certain event happens. In Java, I want to tell a .NET 3.5 application, running on the same machine, that this event occurred. The total data transferred each time is probably a few characters.

What is the best way of using Java to tell the .NET process that something happened?

Java doesn't seem to support Named Pipes on Windows, .NET doesn't natively support memory-mapping, and any solution involving web services or RMI is overkill.

+2  A: 

Something as simple as a FileSystemWatcher, may do the trick for you.

Nescio
+2  A: 

If you don't want the full overhead of RMI, you could do direct socket communcation between the two by opening ports and talking to eachother. You'd have to have some way to have both processes agree on which ports to use, how to handshake/etc, but would be simpler than RMI.

ETA: it looks like you can use named pipes from java, you just can't create them? So if the .NET process would create it, you could read/write to it with java. Java just sees it as a file?

John Gardner