The easiest way is using socket communication between your java app and SWFKit.
Create a socket server in your java app,and using SWFKit to connect to your localhost server, here is a sample of using socket communication:
http://www.swfkit.com/download/src/time_src.zip
hope it can help,