Fix java CMakeLists
Refactor JTox cpp code