There is persianutils project which includes a bi-directional DateConverter; Gregorian <-> Persian (Jalali). It is written in Scala, so I suppose using it in a Java project would be quite easy.
The algorithm used is valid for Gregorian years up to ~3790 and Persian years up to ~3170.
DISCLAIMER: I am the author of PersianUtils