I have a legacy project in which the main form and a modal form (for displaying a help screen) were designed in Scene Builder. Both contain WebViews. Being first developed under Java 8, I used Launch4j to produce the executable.
However I had to make a minor update and having now moved to Java 11 for all projects, while it continues to work in Release mode in the IDE, I found that the WebView in the main form is not functioning correctly when I use the integrated packager even though I've added #PackagerProperty: IncludedModules = javafx.web
Here is the relevant code:
In Release mode in the IDE the startpage is displayed in the wv1 WebView in the main form and the PageFinished event must be triggered because the URL test is displayed and the progress indicator becomes invisible.
However, when the exe generated by the integrated packager is run, the progress indicator just continues to run and nothing is displayed in the wv1 Webview. Incidentally if I revert to Java 8 and use Launch4j everything works as previous.
The WebView in the modal form functions correctly in both the IDE and Webview and from the exe generated by the Integrated B4JPackager11.
Any suggestions as to what I may have to change to suit Java 11 and the integrated packager?
However I had to make a minor update and having now moved to Java 11 for all projects, while it continues to work in Release mode in the IDE, I found that the WebView in the main form is not functioning correctly when I use the integrated packager even though I've added #PackagerProperty: IncludedModules = javafx.web
Here is the relevant code:
B4X:
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("LiveStatsV1") 'Load the layout file.
MainForm.Title = "LiveStats Analysis " & Ver
MainForm.Icon = fx.LoadImage(File.DirAssets,"BDSConsulting.png")
we.InitializeNewInstance("javafx.scene.web.WebEngine",Null)
Temp = wv1
we = Temp.RunMethod("getEngine",Null)
wv1.Enabled = True
wv1.Visible = True
tv2.Visible = False
BrowserURLText.text = "http://"
we.RunMethod("load",Array As Object(startPage))
MainForm.Show
progInd.Visible = True
End Sub
Sub wv1_PageFinished (Url As String)
If Url.Contains("www.fibalivestats.com") Then
Dim start As Long = sf.InString(Url, "u/")
Dim right As Long = sf.Len(Url)
right = right - start - 2
Dim partUrl As String = sf.Right(Url, right)
Dim slash As Long = sf.InString(partUrl, "/")
Dim code As String = sf.Mid(Url, start + 1, slash + 2)
URLText.Text = Url.Replace(code,"data")
End If
BrowserURLText.Text = Url 'Display URL of page loaded in browser
progInd.Visible = False
End Sub
In Release mode in the IDE the startpage is displayed in the wv1 WebView in the main form and the PageFinished event must be triggered because the URL test is displayed and the progress indicator becomes invisible.
However, when the exe generated by the integrated packager is run, the progress indicator just continues to run and nothing is displayed in the wv1 Webview. Incidentally if I revert to Java 8 and use Launch4j everything works as previous.
The WebView in the modal form functions correctly in both the IDE and Webview and from the exe generated by the Integrated B4JPackager11.
Any suggestions as to what I may have to change to suit Java 11 and the integrated packager?