Can I embed a Bytecode inside my source code?

Can I write bytecode inside the class method so that the compiler bypasses this part since it has already been compiled. Something like writing C build programs using "asm" ...

+3
source share
1 answer

I think you mean Java. If this is the case:

The short answer is no .

Long answer: There is nothing like this in Java asm { ... }. But you could (not very smart in most situations) write a file .class(or have bytecode in a textual representation and then assemble it in Java into a file .class) from Java and dynamically load and execute it.

+4

Source: https://habr.com/ru/post/1735254/


All Articles