• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java and C# in 1 project

 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ?
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Vu Pham
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 .
 
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
reply
    Bookmark Topic Watch Topic
  • New Topic