Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I run a Java GUI application on a headless Linux that does not support GUI?

I have created a Java GUI application that is running in Windows. Now I want it to run it on a headless Linux instance that does not support GUI. I wanted to convert the GUI to TUI. Is there a way I can substitute some classes and make it run in Linux by TUI. Please help.

like image 597
Viki Avatar asked Jul 14 '12 06:07

Viki


People also ask

What is Djava AWT headless true?

Headless mode This means that your Java application does not display windows or dialog boxes, does not accept keyboard or mouse input, and does not use any heavyweight AWT components. This mode is selected by specifying Java property java. awt. headless=true on the Java invocation.

What does headless mean Ubuntu?

Headless software (e.g. "headless Java" or "headless Linux",) is software capable of working on a device without a graphical user interface. Such software receives inputs and provides output through other interfaces like network or serial port and is common on servers and embedded devices.


1 Answers

You can use PeterMmm's suggestion http://www.pitman.co.za/projects/charva/index.html

Or, you can run the GUI on your local machine by running an X server, then connecting to the Linux box using ssh -X. That will show the GUI on your local machine, but the program is actually running on the linux box.

Or, you can run XVFB to fake a GUI on the Linux box. You won't be able to see the GUI or interact with it in any way, but that might not matter to you.

like image 56
artbristol Avatar answered Sep 20 '22 23:09

artbristol