My UI can run in Windows7 but it cann't run in debian 8.5/Virtualbox. I alwasy get following message
java version is "1.7.0_111"
java version is "1.7.0_111"
B4X:
Exception in thread "AWT-EventQueue-0"
java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207)
at java.awt.Window.<init>(Window.java:535)
at java.awt.Frame.<init>(Frame.java:420)
at javax.swing.JFrame.<init>(JFrame.java:218)
at com.javafx.main.Main$1.run(Main.java:882)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:745)
at java.awt.EventQueue.access$300(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:706)
at java.awt.EventQueue$3.run(EventQueue.java:704)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:715)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
B4X:
#Region Project Attributes
#MainFormWidth: 800
#MainFormHeight: 480
#End Region
Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private we,temp As JavaObject
Private startPage As String = "http://127.0.0.1:8001"
Private doc As JavaObject ' JavaObject library
Private js As jScriptEngine ' jScriptEngine library
Private WebView1 As WebView
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.SetFormStyle("UNIFIED")
MainForm.rootPane.LoadLayout("main1") 'Load the layout file.
temp = WebView1
we = temp.RunMethod("getEngine",Null)
WebView1.Enabled = True
WebView1.Visible = True
we.RunMethod("load",Array As Object(startPage))
MainForm.Show
End Sub
Sub WebView1_PageFinished (Url As String)
End Sub
Sub WebView1_LocationChanged (Location As String)
End Sub