BLD: improved Java build infrastructure