You can totally do that. It does take a little bit of work to spawn the Jni connection, add the libs to the classloader, etc
Disclaimer: This code is a bit old and hasn't been updated to a recent version of jni but it should give you a general gist of requirements: github.com/flutter/demo...
github.com
demos/native_interop_demos/jnigen_db_native_interop at main · flutter/demos
This repo is for unmaintained code that supports talks, blogs, and other experiments. - flutter/demos