I have a special problem in coding a dynamic menu in Java.
What I want: I want a menubar that looks for special files (example: addon01_men.class) and adds the content of this file to the menu as a new item.
Problem: To invoke the methode/class in the file, I've to invoke it in the main file. But the addon-class is needed in this case, because java checks the presence of the methode/class. So the program will not start, if "addon01_men.class" is missing.
My solutions didn't work (perhaps in my fault): - Reflections - Override
I don't want to use dynamic classes because it's necessary to compile when the program starts - because not all PCs that can run java, can compile java.
I'd be pleased when someone has a working idea. Thank you.