Download the J2SDK from
www.javasoft.com the Phex source release (phex_0.6.3_src.zip) and the Phex runtime release (phex_0.6.3.zip).
The runtime release contains some library you need to compile.
Use your favorite Java editor to edit the code. If you like you can also use Ant to compile your source or use the J2SDK javac compiler or your favorite Java IDE.