Unable to run Java GUI programs with Ubuntu

前端 未结 9 747
天命终不由人
天命终不由人 2020-12-03 04:28

I am learning GUI in Java, and for that I have created a demo program:

import java.awt.*;

public class FrameDemo extends Frame {

    public FrameDemo(){
           


        
9条回答
  •  醉梦人生
    2020-12-03 04:58

    Check what your environment variable DISPLAY's value is. Try running a simple X application from the command line. If it works, check DISPLAY's value for the right value.

    You can experiment with different values of and environment variable on a per invocation basis by doing the following on the command line:

    DISPLAY=:0.0 
    

    How are you calling your program?

提交回复
热议问题