<p>I need an OpenSource API in Java, which can encode *.wav and *.au formats to MP3 and vice-versa. </p>

<p>I have evaluated Java Sound API and <a href="http://openinnowhere.sourceforge.net/lameonj" rel="noreferrer">LameOnJ</a>, but they do not meet my requirements and are not stable, respectively. Please suggest one that is free and platform independent.</p>

Use the
Process API
to invoke
SoX
SoX comes with source or as precompiled binaries for Windows and Mac.