locked
Converting JAVA code to J# RRS feed

  • Question

  • User-1509826454 posted
    I have code that I wrote in JAVA and would like to use it in J#, the problem is that there are libraries that I got from Ericsson(written in java with the extension *.jar) in the code that I would like to import in J#, is there anyway I can do that?
    Wednesday, December 22, 2004 5:13 AM

All replies

  • User1025213086 posted
    There is no way to import a JAR file into the .NET Framework, which J# is based for. You could however, extract the individual class files from the .JAR file then decompile the .class files using a Java decompiler. This method is much more controversial and probably illegal (in terms of software licensing) Although, you could use the jbimp.exe tool in the .NET Framework to convert the Java bytecode into MSIL which then could be imported as metadata. Reply back to me if you need further assistance.
    Monday, January 10, 2005 7:17 PM
  • User-778941913 posted
    I have authored a book called:

    Jave & .NET: A developer guide to interoperability and migration. You can find the same @ www.phindia.com website. This could be very resourceful for you as it conver in depth regarding the Java to J# conversion.
    Sunday, July 31, 2005 2:12 AM