qt调用java接口,从Qt C ++调用Java函数

Is it possible to call java function from Qt Application and if so, how? Do I need to update java source for such task? I have Qt Desktop Opensource edition.

解决方案

First of all think twice before calling java from C/C++. For Android it allow you call some API function of OS, but you pay with perfomance and some hard catching errors.

Qt designed pretty easy way for calling Java: package - androidextra

But if you need call it on desktop there is a way to avoid it: JNI(as Nejat says).

Is it possible to call java function from Qt Application and if so, how? Do I need to update java source for such task? I have Qt Desktop Opensource edition. 解决方案 First of all think twice before calling java from C/C++. For Android it allow you call some API function of OS, but you pay with perfomance and some hard catching errors. Qt designed pretty easy way for calling Java: package - androidextra But if you need call it on desktop there is a way to avoid it: JNI(as Nejat says).
经验分享 程序员 微信小程序 职场和发展