Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using '0:0' as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65)
at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:110)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:74)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:186)
at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:102)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:81)
at sun.swing.SwingUtilities2.isLocalDisplay(SwingUtilities2.java:1457)
at javax.swing.plaf.metal.MetalLookAndFeel.initComponentDefaults(MetalLookAndFeel.java:1556)
at javax.swing.plaf.basic.BasicLookAndFeel.getDefaults(BasicLookAndFeel.java:148)
at javax.swing.plaf.metal.MetalLookAndFeel.getDefaults(MetalLookAndFeel.java:1592)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:536)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:576)
at com.acrosswireless.asap.registry.ConfigManager.main(ConfigManager.java:233)
Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using '0:0' as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65)
at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:110)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:74)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:186)
at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:102)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:81)
at sun.swing.SwingUtilities2.isLocalDisplay(SwingUtilities2.java:1457)
at javax.swing.plaf.metal.MetalLookAndFeel.initComponentDefaults(MetalLookAndFeel.java:1556)
at javax.swing.plaf.basic.BasicLookAndFeel.getDefaults(BasicLookAndFeel.java:148)
at javax.swing.plaf.metal.MetalLookAndFeel.getDefaults(MetalLookAndFeel.java:1592)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:536)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:576)
at com.acrosswireless.asap.registry.ConfigManager.main(ConfigManager.java:233)
You don't provide any useful details, so it's hard for anyone to help you. How are you connecting to the Linux machine? Does that Linux machine have a GUI/window-manager running on it? Version/distro of Linux? Type of GUI? What you're trying to run? ANYTHING??
Based on the error bolded above, the short answer is the workstation you're using either doesn't have X windows running on it, it does not allow remote incoming X sessions, or you have not exported your display variable. Export it with "export DISPLAY=<IP address of remote workstation>:0", then run the command.
Sorry about that... Thanks for the quick response....Let me give some info here.
This is a RHEL 6 install...have an script / app that is used as a configuration manger....
created user... dpa
the Java path set in the user environment:
PATH=/u01/app/oracle/product/11.2.0/dbhome_1/bin:/usr/sbin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/java/jdk1.7.0_04/bin:/home/oracle/bin
JAVA_HOME=/usr/java/jdk1.7.0_04
DISPLAY=:0.0
the script is suppose to open an gui....worked on getting the environment right to allow java path to be seen by the "dpa" user...
Let me know what info you would need and I will post it...
Again, please see my earlier reply. This has nothing to do with your Java path, but the fact that you don't have a running X server on the workstation you're ON.
Quote:
Originally Posted by carlosjohns@gmail.com
I am direct connect... to the Linux machine...
"Direct connect"? HOW are you connected?? Unless you are sitting at the console and have a GUI running, you are not 'direct connected'. You're going in over the network, from another machine. Which brings us back to what that machine is running, does IT have a running X server/emulator, and does it allow incoming X sessions.
Also, since you're using RHEL6, you do know that (by default), X windows/GUI's are NOT installed, unless you specifically install them, right? And, since RHEL is a commercial pay-for distro...have you contacted Red Hat support for assistance?
funny thing is when script was written is was written with switches that could be used.... this was not communicated to me....
none the less...
X-windows is installed and working on the machine ..... I did install them, running other GUI apps.... :-)
yes the machine does allow incoming sessions....
this a lab machine, we are simulating a commercial environment
have not contacted RHEL for support....
now this is what I found on the web about this error:
Set JVM default property with _JAVA_OPTIONS
export _JAVA_OPTIONS=-Djava.awt.headless=true
java |more
Picked up _JAVA_OPTIONS: -Djava.awt.headless=true
Setting JVM -Djava.awt.headless=true is necessary if X server is not available.
Without this property following error is thrown:
Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using '' as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.access$100(X11GraphicsEnvironment.java:52)
at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:155)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:131)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68)
at sun.font.FontManager.initSGEnv(FontManager.java:1307)
at sun.font.FontManager.findFont2D(FontManager.java:1984)
at java.awt.Font.getFont2D(Font.java:455)
at java.awt.Font.canDisplay(Font.java:1904)
at java.awt.Font.canDisplayUpTo(Font.java:1970)
at java.awt.font.TextLayout.singleFont(TextLayout.java:451)
at java.awt.font.TextLayout.<init>(TextLayout.java:509)
at org.apache.poi.hssf.usermodel.HSSFSheet.autoSizeColumn(HSSFSheet.java:1675)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.