Converting JAVA cert from PKCS#12 to JKS

I understand that most view the JKS as unsecure and/or obsolete, but the fact remains that many modern software still rely on Java KeyStores to function.

I already have the code to load, decode and parse my CA certificate, my server certificate and my PKCS#12 certificate.

Anyone has working examples on how to convert the .P12 file to .JKS ?

At the end of the day I could just exec.Command(“keytool”, …), but this means that any time I RPM/DEB/APK package my own tool, it’ll need some version of Java as a dependency in order to provide keytool, while the name of the game here was to completely avoid Java