Java database and txt file reader with API project