cast result from Java string object to char
changed local variable path to unisensPath
added missing closeAll at the end
added support for Java 1.7