Important notes

Java2il does not generate PE executables directly. It only generates assembly text files. To actually get binary executables, you need to assemble the output with an assembler. In the example below, the ilasm Microsoft assembler is used.

For the moment, java2il depends on the J# vjslib assembly. Thus, if you want to access the Java library, you need to have the assemlby vjslib in your GAC (support for other platforms may be added in the future).

The java2il interface is command line based. type

java2il --help
to get all the available options.

Sample invocation

Here an example how to translate the famous Hello World Java program

  • Assuming the class is Hello.class
    java2il --assembly Hello --entrypoint Hello Hello.class
  • This will generate a file, you need to assemble it to get an executable:
    ilasm /out:Hello.exe
  • You should then be able to run the translated Hello.exe file

SourceForge Logo

Valid HTML 4.01!