writing old C++ files to java