Re: Java classes called from .net program

From: Dino Chiesa [Microsoft] (dinoch_at_online.microsoft.com)
Date: 10/26/04


Date: Tue, 26 Oct 2004 12:50:36 -0400

if the java classes are available in source code, you can compile them from
java source directly into MSIL with the J# Compiler. this works if the java
source code is at JDK 1.1 . On the other hand if the java code uses java
collections classes or java 2 security or other things that were introduced
in or after JDK 1.2, then the source code cannot be compiled by J# directly
.

there is a converter : it's called the java language conversion assistant or
JLCA , for short. the JLCA can convert java source code into C# source code.
this is effectively a fork of your code. The C# code can be compiled into
MSIL.

On the other hand if the java code is available in some other way , via some
network interface for example, then you can try connecting via one of the
Interop alternatives, such as web services or one of the third party bridges
.

"Licx" <licx_@hotmail.com> wrote in message
news:326bb844.0410260524.169ccc7b@posting.google.com...
>I need to call methods of java classes from a .net program. There is a
> way to do this?



Relevant Pages

  • Re: creaping coupling......
    ... In C++ it would be trivial to break that source code dependency, ... When you compile a .java module, ... In Java and C# it's asserted at compile time. ...
    (comp.object)
  • Re: Java server wont run after reboot
    ... > package definitions in your source code. ... Execute from that directory, no classpath definition needed. ... > java HelloWorld ... > If you compile to a different location, ...
    (RedHat)
  • Re: Something has to be tested and maintained was Re: GoTo in Java
    ... I am on record as saying that maintenance of source code is self defeating. ... every module or program when new functionality is added. ... is that a brick is a brick; it has the attributes and behaviours of a brick. ... to translate it to Java, and get something not too bad. ...
    (comp.lang.cobol)
  • Re: GoTo in Java
    ... >> to translate it to Java, and get something not too bad. ... > your 'cleaned up' Java now works the same as the Fortran code. ... NOT maintain source code. ... Encapsulate functionality and reuse it. ...
    (comp.lang.cobol)
  • Something has to be tested and maintained was Re: GoTo in Java
    ... to translate it to Java, and get something not too bad. ... Source code translations have been tried for several decades and they ... Because of its COBOL and procedural programming roots, ... Encapsulate functionality and reuse it. ...
    (comp.lang.cobol)