I want to create a java program that generates another java class in the same project. For example in the class Dragon.java, i want to write java code that creates another java class called fire.java. I do not want to use any GUI from eclipse, just pure code that generates another class from the execution of written programming in java.
I have tried making objects of a non existent class in hopes of the program automatically producing a class with that name.
Again, it doesn't have to be just a java class, is there a way to make other forms of files also? for example fol.flow, or of different names.
fire.javais just a text file, it seems you're simply asking how to write a text file from Java. Given that you can find a gazillion examples of how to do that online, I'm confused about what you're really asking. Please edit the question and clarify it..javafile alone won’t permit you to use the generated Java code from the program that has generated the file. For that you would need the compiler interface (search for it).