We recommend you to recompile the custom code with the new JVM, but
also to use the SDK 12.8 to insure that the functions that your custom
code will use to be at the exact level of the Policy Server one and
they are up to date.
But depending of the code you're using, you may test it as is with the
new Policy Server. As java code is bit code and can be move from
version, there are chances that the former .jar files will still work
fine with the new JDK and Policy Server.
If from those tests you face any execution problem, then recompile with
the new JDK and SDK as per the ones that Policy Server runs.