there's a java project which wraps LAME with JNI. That's your best bet. JRE has no core mp3 support. You could figure out whatever you want, or setup some piped streams and use something command line...