Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

unable to run my applet using appletviewer  RSS feed

 
Mullangi Renuka
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can my applet using brower but not through an appletviewer.
The command i am using is
appletviewer helloworld.html
The error message i am getting is
java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.
at sun.awt.motif.MToolkit.<init>(Compiled Code)
at java.awt.Toolkit.getDefaultToolkit(Compiled Code)
at sun.applet.AppletCopyright.<init>(Compiled Code)
at sun.applet.AppletViewer.mainInit(Compiled Code)
at sun.applet.AppletViewer.main(Compiled Code)
and it doesnt come out of it in unix. I need to specifically use crtl c to break this and come to prompt
Please help me with this.
Thanks
Renuka
 
Javaoops
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
U should have XWindows(unix compatible GUI emulator) installed
in your machine and set to run swing /awt programs from unix else u will get the runtime error.
Also the DISPLAY variable should be set to your machine's IP address like <ipaddress>:0.0
Normally u have to use ^C to quit when there is an abnormal termination of a program

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!