Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
04-17-2004, 08:41 AM
|
#1
|
Senior Member
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,203
Rep:
|
java can't display
hi need to run the following commands to debug a program
1 # Compile the java installation program
2 javac -classpath java java/Install/Install.java
3 # Execute the compiled java program
4 java -classpath java Install.Install -compile
but when i am executing i take the following message
akroneiro:/usr/local/JabberwockyBinary # ./install
Xlib: connection to ":0.0" refused by server
Xlib: Invalid XDM-AUTHORIZATION-1 key (failed key comparison)
Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using ':0.0' as th
e value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:134)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:62)
at java.awt.Font.initializeFont(Font.java:308)
at java.awt.Font.<init>(Font.java:344)
at javax.swing.plaf.metal.DefaultMetalTheme$FontDelegate.getFont(DefaultMetalTheme.java:195)
at javax.swing.plaf.metal.DefaultMetalTheme.getFont(DefaultMetalTheme.java:153)
at javax.swing.plaf.metal.DefaultMetalTheme.getControlTextFont(DefaultMetalTheme.java:129)
at javax.swing.plaf.metal.MetalLookAndFeel$FontActiveValue.createValue(MetalLookAndFeel.java:1399
)
at javax.swing.UIDefaults.getFromHashtable(UIDefaults.java:196)
at javax.swing.UIDefaults.get(UIDefaults.java:126)
at javax.swing.MultiUIDefaults.get(MultiUIDefaults.java:44)
at javax.swing.UIDefaults.getFont(UIDefaults.java:346)
at javax.swing.UIManager.getFont(UIManager.java:491)
at javax.swing.LookAndFeel.installColorsAndFont(LookAndFeel.java:89)
at javax.swing.plaf.basic.BasicLabelUI.installDefaults(BasicLabelUI.java:302)
at javax.swing.plaf.basic.BasicLabelUI.installUI(BasicLabelUI.java:254)
at javax.swing.JComponent.setUI(JComponent.java:449)
at javax.swing.JLabel.setUI(JLabel.java:238)
at javax.swing.JLabel.updateUI(JLabel.java:248)
at javax.swing.JLabel.<init>(JLabel.java:141)
at javax.swing.JLabel.<init>(JLabel.java:171)
at Install.Install.main(Install.java:71)
as you can see it can't connect as 0:0
the display has value
akroneiro:/usr/local/JabberwockyBinary # echo $DISPLAY
:0.0
What i must do?
|
|
|
04-17-2004, 11:51 AM
|
#2
|
Moderator
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,795
|
can you run a regular X11 program, say xclock from the same shell ?
|
|
|
04-17-2004, 12:30 PM
|
#3
|
Senior Member
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,203
Original Poster
Rep:
|
yep
unfortunately yes......
|
|
|
04-17-2004, 03:51 PM
|
#4
|
Moderator
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,795
|
try "xhost +"
|
|
|
04-18-2004, 01:25 AM
|
#5
|
Senior Member
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,203
Original Poster
Rep:
|
thx but
i have tried it..... I was thinkinf is the way i used the command wasn't the right..
|
|
|
04-18-2004, 07:33 AM
|
#6
|
Moderator
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,795
|
Well, the commands you show look correct.
The problem probably lies either on your X11 server or in the native graphic library your java implementation is using.
But you do not tell us what they are.
Did you have the chance to try your program on a different platform ?
Have your tried using "<hostname>:0" or localhost:0 ?
|
|
|
04-18-2004, 08:36 AM
|
#7
|
Senior Member
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,203
Original Poster
Rep:
|
nop
Can u explain me more what do u mean....what i must write in the console?
|
|
|
04-18-2004, 06:57 PM
|
#8
|
Moderator
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,795
|
export DISPLAY=$(hostname):0
export DISPLAY=127.0.0.1:0
|
|
|
04-19-2004, 05:04 AM
|
#9
|
LQ Newbie
Registered: Apr 2004
Posts: 2
Rep:
|
Are you allready test this?
Code:
java -Djava.awt.headless=true
|
|
|
08-29-2004, 09:43 AM
|
#10
|
LQ Newbie
Registered: Aug 2004
Distribution: Red Hat 9
Posts: 1
Rep:
|
Same problem no results
Hi folks,
I have tried all that you talk and I'm having the same problem!!! my application is using ssh and is maded with AWT.
Please any help that you can bring to me??
Greetings,
|
|
|
08-29-2004, 10:11 AM
|
#11
|
Moderator
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,795
|
What is doing the "install" command ?
How is ssh related to that ?
Are you remotely connected to some host through ssh ?
Is you application itself using ssh ?
|
|
|
All times are GMT -5. The time now is 09:21 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|