How to compile and execute Scala script in Java Application

How to compile and execute Scala script file in a Java Application? I think previously Nashorn Script Engine was used and but it was removed from JDK 15