According to onelook, the words of the form *ei*ie* are: http://onelook.com/?w=*ei*ie*&scwo=1&sswo=1
And the shortest is the six letter:
heinie
although I'm giving a nod to the seven letter
deified
since it is also a palindrome.
As for the words of the form *ie*ei*: http://onelook.com/?w=*ie*ei*&scwo=1&sswo=1
The shortest is:
Biedermeier
Although that is a proper noun. Otherwise, the winner is
spiegeleisen
... a type of pig iron.
Now, back to Java...