An old Minecraft ebuild that no longer works in Gentoo provided a shell script wrapper around java that would modify the java classpath it received to redirect everything to system libraries. If you can still override what version of java to use, you can probably still pull something similar. Minecraft has to pass all the java libraries to java in the argument list.
I’m not 100% sure what you are talking about, as I said most of this is over my head, but it looks like the script that is being used in the tutorial for this thread does what you are talking about, or at least something similar.