Is it possible to use Java to create dll?

前端 未结 9 1236
轮回少年
轮回少年 2021-02-07 23:42

Want to create animation dll for Window XP Is it ok to create Java2d animation and export as dll??

9条回答
  •  余生分开走
    2021-02-08 00:07

    Actually, what Quentin said should work.
    When you compile java to native with GCJ you first compile the .java files into platform specific .o (object) files. Presumably you would compile the .o files into a dll rather than an exe. GCJ also includes components like the garbage collector, and base java libraries. None of which require a JVM to run. The downer is that the dll would be huge. A simple "Hello World" app when compiled with GCJ is ~35MB, thanks to all the default libs and the garbage collector. Likewise your dll would be huge.

提交回复
热议问题