哦,谢谢,我已经知道了,下面就是我实现的方法:
GregorianCalendar grcEmployee = new GregorianCalendar();
GregorianCalendar grcSystem = new GregorianCalendar();
grcEmployee.setTime(employee.getEmployDate());
int x = 0;
while((grcEmployee.YEAR != grcSystem.YEAR) && (grcEmployee.MONTH != grcSystem.MONTH))
{
     x++;
     grcEmployee.add(grcEmployee.MONTH,x);
}
Integer serviceLength = new Integer(x);