简体   繁体   中英

Java and .NET application communication

I don't think this is quite possible or if it is recommended to do... but is there a way to connect or comunicate or deploy Java and .NET application for method beside Web Services. I mean I understand there are Messaging server that allows Java application communicate to each other but I dont know if this can cross development environment, any suggestion about it or thoughts about this?

I'm limited to web and desktop environments.

Apache Thrift is a way to go. You will need to write a service definition like this:

serivce helloworld{
    string sayHello(1:string name)
}

Thrift then will generate RPC interface with network layer already implemented, It support many others language such as Java, C#, PHP, Python. Thrift support binary protocol over TCP/IP, so it's very fast. for more, go to its wiki page http://wiki.apache.org/thrift/

您可以使用类似Apache ActiveMQ的东西,它在Java方面使用JMS ,在.NET方面使用.NET Messaging API

我们最终编写了自己的基于Hessian (也添加了JSON)的Java-.Net通信协议的实现,但是Thrift是有效的选择。

The virtual machines (JVM vs CLR) are not going to talk to each other except through some OS level open standard. Shared Files (yuck), Sockets and Web Services come to mind. There is nothing that would allow you to call a .net subroutine from java or vice-versa.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM