在运行时生成、编译和使用 Java 代码? [英] Generating, compiling and using Java code at run time?
本文介绍了在运行时生成、编译和使用 Java 代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个场景,我必须在我的应用程序运行时生成 Java 代码.
I have a scenario where I have to generate Java code when my application is running.
可以编译和运行我的应用程序中的代码(作为一个单独的应用程序).
Can compile and run than code from my application( as a separate application).
是否可以从同一个应用程序编译然后使用它.想不到任何可能
Is it possible to compile and then use it from the same application. Cant think of any possibility
推荐答案
查看 使用 javax.tools 创建动态应用程序.我今天第二次提到这个——我发誓我不为他们工作.
这篇关于在运行时生成、编译和使用 Java 代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文