07-16-2009
swing not getting initialized when the DISPLAY is not set
I have a batch programme which will load the Spreadsheet into database..
When the DISPLAY is set and X11 window server is running, there is no issue in reading the spreadsheet and loading into database without lauching UI.
But if the display is not set, then there is an issue... Any ideas over this ?? Why does a batch programme requires DISPLAY and X11 window server to be set when there is no need of UI to launch....
Code pasted below :
24 public class Spreadsheet extends com.f1j.swing.JBook
25 {
26 private int failedSheetNum = 0;
27
28 public Spreadsheet()
29 {
30 super();
31 setup();
32 }
Exception is thrown at line 30 :
Exception in thread "main" Logging starts at 15/7/2009 10:52:16
Loading the XML...
This might take a few seconds.Please wait...
Loading the Mapping template...
Loading the input data file...
This might take a few seconds.Please wait...
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 <Unloaded Method>
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName0(Compiled Code)
at java.lang.Class.forName(Compiled Code)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:56)
at <Unloaded Method>
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName0(Compiled Code)
at java.lang.Class.forName(Compiled Code)
at java.awt.Toolkit$2.run(Toolkit.java:492)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:485)
at java.awt.SystemColor.updateSystemColors(SystemColor.java:339)
at <Unloaded Method>
at java.awt.Insets.initIDs(Compiled Code)
at com.f1j.swing.JBook.<init>(DashoA8533)
at com.f1j.swing.JBook.<init>(DashoA8533)
at gdm.ssl.Spreadsheet.<init>(Spreadsheet.java:30)
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi All:
An elementary Unix Question,
How can i set the display number and run a program in that display.
If i type the name of the executable the program opens in the console(display number 0), however, i want it to open in another display number. How can i do that.
Appreciate the help... (2 Replies)
Discussion started by: preetham
2 Replies
2. UNIX for Dummies Questions & Answers
hi, i am on mandrake 6.0, shell of root user is bash.
okay, i did the below
#display=localhost.localdomain:0.0
#export display
#xhost +localhost.localdomain
system replies xhost added..
i did a set and there was an entry there..
now i want to install oracle, so did a ./runInstaller
... (2 Replies)
Discussion started by: yls177
2 Replies
3. Solaris
Hi,
I used exceed and putty in the past to HP server with no problem to make
'set DISPLAY' work on my desktop. However now I have Solaris 9 on Sun server 480 and I only have putty. I can't bring the X window (eg xclock, etc) to my desktop.
I tried X11Fowarding, xhost, and so on, it doesn't... (5 Replies)
Discussion started by: jr_zhang
5 Replies
4. Shell Programming and Scripting
Hi All,
I use "export DISPLAY=same_host:0.0" to set my export DISPLAY and it is working fine for me..
Problem here is I have developed a script for which i should run export DISPLAY prior to running my script....
so my script should check whether export DISPLAY is set or not.. if... (6 Replies)
Discussion started by: smarty86
6 Replies
5. UNIX for Dummies Questions & Answers
Hi, I just updated /etc/passwd so that my default shell is zsh. After I save and make a new connection I can echo $SHELL and see /usr/bin/zsh, but my prompt still looks like bash and some env var that I setup in my local .zshrc file are not set. If I type zsh, then my prompt changes and I have my... (7 Replies)
Discussion started by: yankee428
7 Replies
6. Solaris
How do I set up my solaris 10 machine to display in text mode instead of graphics mode, permanently? (1 Reply)
Discussion started by: jastanle84
1 Replies
7. Solaris
My "problem" is that it's set correctly and I want to break it, but can't figure out where it's getting set in the first place.
I can see several places where $DISPLAY is referenced but at the point that the dollar sign is in front it's already an environment variable(I think).
I thought... (1 Reply)
Discussion started by: gctaylor
1 Replies
8. Windows & DOS: Issues & Discussions
Hi all,
Our users use Putty on Windows servers to log on to UNIX via SSH and run GUI applications. Is there a way to automatically get the display numbers from xming or Exceed (that are running on Windows) to set the DISPLAY var properly on UNIX? X11 forwarding is not an option.
The closest I... (3 Replies)
Discussion started by: ejianu
3 Replies
9. Solaris
Hi,
When i invoke DBCA as oracle user , i get following
usircd01:KAM:/opt/oracle10/product/10.2.0/bin>./dbca
DISPLAY not set.
Set DISPLAY environment variable, then re-run.
usircd01:KAM:/opt/oracle10/product/10.2.0/bin>echo $ORACLE_SID CCE ... (6 Replies)
Discussion started by: Maddy123
6 Replies
10. Ubuntu
Hi, somewhat of a newbie with Linux, although I have been at it for about three weeks now.
Is there a way to wake up or initialize my scanner with a command in the terminal? (6 Replies)
Discussion started by: klrman
6 Replies
LEARN ABOUT CENTOS
mutter
MUTTER(1) General Commands Manual MUTTER(1)
NAME
MUTTER - Clutter based compositing GTK2 Window Manager
SYNOPSIS
mutter [--display=DISPLAY] [--replace] [--sm-client-id=ID] [--sm-disable] [--sm-save-file=FILENAME] [--version] [--help]
DESCRIPTION
This manual page documents briefly mutter.
mutter is a minimal X window manager aimed at nontechnical users and is designed to integrate well with the GNOME desktop. mutter lacks
some features that may be expected by traditional UNIX or other technical users; these users may want to investigate other available window
managers for use with GNOME or standalone.
OPTIONS
--display=DISPLAY
Connect to X display DISPLAY.
--replace
a window manager which is running is replaced by mutter. Users are encouraged to change the GNOME window manager by running the new
WM with the --replace or -replace option, and subsequently saving the session.
--sm-client-id=ID
Specify a session management ID.
--sm-disable
Disable the session management.
--sm-save-file=FILENAME
Load a session from FILENAME.
--version
Print the version number.
-?, --help
Show summary of options.
CONFIGURATION
mutter configuration can be found under Preferences->Windows and Preferences->Keyboard Shortcuts on the menu-panel. Advanced configuration
can be achieved directly through gsettings.
SEE ALSO
mutter-message(1)
AUTHOR
The original manual page was written by Thom May <thom@debian.org>. It was updated by Akira TAGOH <tagoh@debian.org> for the Debian
GNU/Linux system (with permission to use by others), and then updated by Luke Morton and Philip O'Brien for inclusion in mutter.
11 February 2006 MUTTER(1)