java config code

java config code and doc