Converting a large C++ code base (800k lines of code) into Java alone is challenging. Changing the architecture from a monolith into an application adhering to the Java application server standard and to run it on WildFly is a different number. This report describes the experience made during the C++ to Java conversion, the techniques used as well as the way to success of running the Java code on the application server for the first time. The approaches to solve the usual C++ to Java culprits, like multiple inheritance, enum-handling and scoped objects are described. A clang-tool-based software is developed to continuously regenerate the Java, because development on the C++ code base continued.
翻译:将大型C++代码库(80万行代码)转换为纯Java本身已颇具挑战。而将其架构从单体应用转变为遵循Java应用服务器标准、并能在WildFly上运行的应用,则完全是另一回事。本报告描述了在C++到Java转换过程中积累的经验、采用的技术,以及首次在应用服务器上成功运行Java代码的实现路径。文中详述了解决C++到Java转换常见难题(如多重继承、枚举类型处理和作用域对象)的方法。由于C++代码库的开发仍在持续进行,我们开发了基于clang-tool的软件来实现Java代码的持续再生。