I just created a simple java application that will generate entity classes for our database. Those java classes I will save to my local disc. So far everything works fine.
Now I want to genereate a JAR file from those java classes within my main application. I know, that I can manipulate jar files and I also read about adding classes to a jar file during runtime.
But in my case I don't have the classes in my build path. What I need is the create the class files from my just created java files and put them into my jar file.
Is that possible inside my java application?
The reason why I am doing that is that our database will be extended by many persons all the time and I don't want to add those fields to my entity manually. So I wanted to create an application that scanns the systables from our database and generates from those information the java entity files. But now I need to compile those java files in class files after generating them and to add them to my final jar file.
Thanks for any help and/or information about this issue.
Many greetings, Hauke