How to make javax.tools.JavaCompiler save bytecode not to disk, but to Collection<Byte> and is it possible at all? It turned out to transfer the source code to it in the form of a string, now it remains to wean the climb on the disk to save the results ...

  • one
    And you did not try to specify your own Writer and JavaFileManager ? - VladD

1 answer 1

I found it, made it for this article (I see this api in the eye for the second day): the eval function in java did it yourself, did not know what to do with the file manager, there is a certain parameter used for the URI ("byte: ///"), due to it works. Writer, as I understand it, is used to display error information. Thank you all, the question can be closed.

  • Although the link can find the answer to the question, it is better to point out the most important thing here, and give the link as a source. If the page to which the link leads will be changed, the response link may become invalid. - Real KEK