This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Compiling: javac HelloWorldFrame.java running:java HelloWorldFrame when i running i getting below error i am new to this help me
Exception in thread "main" 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:159) at java.awt.Window.<init>(Window.java:407) at java.awt.Frame.<init>(Frame.java:402) at java.awt.Frame.<init>(Frame.java:367) at javax.swing.JFrame.<init>(JFrame.java:163) at HelloWorldFrame.<init>(HelloWorldFrame.java:11) at HelloWorldFrame.main(HelloWorldFrame.java:9)
Have you looked for HeadlessException in the Java API documentation? It tells you that you are short of a dependency (keyboard, screen or mouse) which is required to display your application. The message about X11 suggests you haven't got the screen configuration set up. Maybe your version of the OS runs only on a command-line. It runs nicely on my PC without any changes.
You will probably get more appropriate help if I transfer you to a different forum . . .
Joined: Oct 13, 2005
I don't think this is a Java-related problem, but to do with X11 settings.