I am looking for some ideas on how to compile Java code with some other code snippets (method calls). I fully understand that javac will not allow you to compile Java files if you cannot find all the dependencies. But perhaps there is a way around it, something like compiling force.
Knowing the bytecode is not so good, but I think some invoke method is just a complete definition of the class package and method name with parameters. Therefore, if the compiler simply puts this data in the class file and suppose that the process will be available in the running dependency (if not just NoSuchMethodExp).
The only workaround I found was to create empty missing class files with empty methods for the cheat compiler. Works fine, but there should be an easier way:
Any ideas?
source
share