Vape uses JNI
But there are other methods which might be easier for you since it seems that you are a beginner.
Look at Java Agents. Those things were designed to do exactly what you need.
They an be loaded after the VM started and you can modify classes.
They are extremely easy to detect tho, but so is Vapes JNI approach.
If you want to be undetected you have to reverse parts of the JVM, because you are not able to access anything what could have been tampered with, because all of that could contain a anticheat payload, which tracks your unauthorized call down and bans/kicks/whatevers you.