zhiguo's java code