Writing and implementing new Java class files during run-time
问题 Is it possible to somehow 'import' a new Java class into a running program and make use of it? Could I have a program create a new File of type '.java' and then include it in the project files and reference it without having to restart the program? The following is an example of what I mean: import java.io.*; public class Program { File JClass = new File("JClass.java"); public static BufferedWriter out = null; public static void main(String[] args) { try { out = new BufferedWriter(new