Posted November 6, 20204 yr Hi. Does anyone know how to compile a string and get the output as a string? I'm trying to make an programming mod for in-game java programming. An gui that acts as a "IDE": But I need to compile the code written by player. I have this string made by user in-game: String code = "class JavaMod{ public static void main(String args[]){ System.out.println(\"Text\"); } }"; I need to compile the string, get the output in a "String output", (in this case the value should be "Text"), and show in-game GUI; Of course for the player to play this mod will require JDK configured with bin path in control panel enviorment variables, because I need the actual Java Virtual Machine on player's PC for the code to be compiled, no? Edited November 6, 20204 yr by MikeyJY
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.