make build.sh cygin+emacs friendly
fix java1.6 generics bug