Compiler to translate Java bytecode to platform-independent C code before runtime?

后端 未结 7 2020
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-28 10:40

I\'m looking for a compiler to translate Java bytecode to platform-independent C code before runtime (Ahead-of-Time compilation).

I should then be able to use a sta

7条回答
  •  無奈伤痛
    2020-12-28 11:14

    GCJ has this capability, but it hasn't got great support for Java features past 1.4, and Swing support is likely to be troublesome. In practice though, the HotSpot JIT compiler beats all the ahead-of-time compilers for Java. See benchmarks from Excelsior JET. To clarify: GCJ converts java source/bytecode to natively compiled code

    Toba will convert (old) Java bytecode to C source. However, it hasn't been updated since Java 1.1. It may be helpful to partially facilitate the porting, but it just can't handle all the complex libraries Java has.

提交回复
热议问题