Fix Java output stream adapter.
Fix C++-to-Java exception translation.
Fix a segfault in the printer infrastructure when called from API and no language is set