Run a simple text file as Java

后端 未结 3 448
忘了有多久
忘了有多久 2021-01-17 23:50

I have a simple .txt file which has pure Java code inside it like

   public class C {
      public static void main(String[] args ) {
        System.out.prin         


        
3条回答
  •  抹茶落季
    2021-01-18 00:47

    I think I'd start with BeanShell, which allows you to compile and execute Java source held in a string.

提交回复
热议问题