java lib connection to databases and some string function