Skaros Ilias
Skaros Ilias

Reputation: 1068

ui4j library can not run on ubuntu VM with out a browser

I created a scraping program in java using the ui4j library, but it turns out that I have to run it on a VM where a browser is not present.

Is there a way around it? Do I have to install a browser?

if yes do I need a proper one or a text based browser can do? (I don't think so, but i am asking just in case.)

Thanks, Ilias

EDIT:

This is the error i am getting from the VM. From the line saying Unable to open DISPLAY, i assumed there was a problem with the browser. What might b the problem then?

Exception in thread "Thread-1" java.lang.UnsupportedOperationException: Unable to open DISPLAY
        at com.sun.glass.ui.gtk.GtkApplication.<init>(GtkApplication.java:68)
        at com.sun.glass.ui.gtk.GtkPlatformFactory.createApplication(GtkPlatform Factory.java:41)
        at com.sun.glass.ui.Application.run(Application.java:146)
        at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java: 263)
        at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:211)
        at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:675)
        at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:695)
        at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$152(LauncherImpl.java:182)
        at com.sun.javafx.application.LauncherImpl$$Lambda$29/1893654604.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:745)

Upvotes: 2

Views: 1090

Answers (1)

Skaros Ilias
Skaros Ilias

Reputation: 1068

It turns out that i had to enable the Headless Mode of the ui4j as mentioned on the readme file.

Upvotes: 3

Related Questions