(I am assuming thet you are writing a GUI for a Third party Compiler) Does your Java Compiler have a command line flag to force it to produce a Log file and/or redirect output to file, as most of (but not all) the DOS 'C' compilers I work with do.
Sometimes they will produce an error log file which I use in one 'C' compiler GUI.
I do not think there is any way you will be able to directly send the output to a memo, If you have a file it's easy to read that into the memo after the compiler has finished.
When I dont have the file option I allow the user to keep the DOS box open, I know this dosent help if the output scrolls off the screen.
Steve..