aspose file tools*
The moose likes Java in General and the fly likes Java and C# in 1 project Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Java and C# in 1 project" Watch "Java and C# in 1 project" New topic
Author

Java and C# in 1 project

Vu Pham
Ranch Hand

Joined: May 28, 2005
Posts: 100
Hi all,
I want to write a project with both Java & C# . I will compile C# code to .dll file . How can I use that .dll file in Java code ?
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Java has the Java Native Interface (JNI) technology to call to a C/C++ module with methods specially crafted just for this purpose. The C module could call to your C# module and back again. If your C# program is a COM server, Google for "java com bridge" frameworks. Some are free and some are good. Not sure any are both. And you can go for inter-process communication over sockets or HTTP. I think there is a decent Java-DDE implementation, too.

Any of those sound promising? I don't do .net so I could easily be unaware of other really cool options.
[ October 17, 2005: Message edited by: Stan James ]

A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Tony Morris
Ranch Hand

Joined: Sep 24, 2003
Posts: 1608
Why not compile your Java to MSIL?
I haven't googled it, but I'll bet such a thing exists nowadays (haven't used .NET in a while).
The CLR Specification is quite clearly designed to provide a migration from Java. I'm surprised it doesn't explicitly state it, though one might argue that it does.


Tony Morris
Java Q&A (FAQ, Trivia)
Vu Pham
Ranch Hand

Joined: May 28, 2005
Posts: 100
And you can go for inter-process communication over sockets or HTTP


Would you like to give me some tutorials about that ? Thanks very much .
Chetan Parekh
Ranch Hand

Joined: Sep 16, 2004
Posts: 3636
Originally posted by Tony Morris:
Why not compile your Java to MSIL?
I haven't googled it, but I'll bet such a thing exists nowadays (haven't used .NET in a while).
The CLR Specification is quite clearly designed to provide a migration from Java. I'm surprised it doesn't explicitly state it, though one might argue that it does.


check this


My blood is tested +ve for Java.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java and C# in 1 project