set up library code in Java