There are fast multiplicative inverse algorithms which aren't terribly difficult, but there's also one built into Java:
BigInteger.valueOf(e).modInverse(BigInteger.valueOf(eN)).intValue();
The most popular algorithm to compute the multiplicative inverse mod another number is http://en.wikipedia.org/wiki/Extended_Euclidean_algorithm#Modular_integers .