How to programmatically generate .class files?

后端 未结 4 1380
迷失自我
迷失自我 2021-01-02 04:03

I would like to write a compiler for a toy-language for Java. I would like to generate runnable .class files. I was wondering what is the best library or tool available for

4条回答
  •  一向
    一向 (楼主)
    2021-01-02 04:27

    Easiest would be to translate your toy-language into valid .java source code using a preprocessor and then just compile it with javac. That's also the way Processing works.

提交回复
热议问题