EPANETs computational engine is available for download as a separate dynamic link library for incorporation into other applications. The source code for EPANET 2 is available on the EPAs EPANET website.
In 2012 the EPANET toolkit, written in C, was rewritten in Java in a more object-oriented style. The code in Java is available on GitHub: https://github.com/Baseform/Baseform-Epanet-Java-Library.