How do I get Java working for a local Web page files WKWebKit

This does not want to work at all with the new WK Web Kit but Will only work with the old UIWebKit I have tried a lot of new code but still doesn't wanna work at all.

do {

                    w.loadHTMLString(try NSString(contentsOfFile: Bundle.main.path(forResource: "index", ofType: "html")!, encoding: String.Encoding.utf8.rawValue) as String, baseURL: URL(fileURLWithPath: Bundle.main.bundlePath, isDirectory: true))

                } catch {

                    // catch error


                }
Answered by ellj69 in 654834022
Sorta fixes it but not really but a more modern code example of the same issue

let m = Bundle.main.path(forResource: "index", ofType: "html")

webView.load(URLRequest(url: URL(fileURLWithPath: m!)))
Accepted Answer
Sorta fixes it but not really but a more modern code example of the same issue

let m = Bundle.main.path(forResource: "index", ofType: "html")

webView.load(URLRequest(url: URL(fileURLWithPath: m!)))
How do I get Java working for a local Web page files WKWebKit
 
 
Q