Hello Pragathi,
Please see the link below for an answer on the same kind of question:
https://community.mendix.com/link/space/app-development/questions/102092
In short, directly it is not possible, but indirectly yes it is possible!
hope this helps,
Good luck!
Hi,
The simple answer is not at the moment. This may only be possible when Mendix supports Java 21