Monday June 13, 2005
There is a known bug in the Sun Studio 10 compilers and tools uninstaller. This is documented in the release notes of the product, but I've seen a number of people get bitten by it recently, so I thought I'd post about it here. Essentially the problem is that the uninstaller startup script, batch_uninstall_all doesn't work unless you have $DISPLAY set to a valid X display. This tends to be an unexpected requirement, since uninstalling this way doesn't start up a GUI. The issue arises because of the way the Java awt classes behave. Certain classes want to initialize themselves, and attempt to connect to the X server in order to do this. Unfortunately this happens at startup time, not when GUI code is first called. Since the uninstaller classes can be run with an interactive GUI, they do contain GUI code, and so do need to talk to the X display at startup.
The easiest workaround for most people is simply to set $DISPLAY to point to a valid X display (and to set the X server to allow root on the computer running the uninstaller to connect to it). However, this is not possible for everyone. So the other way round this is to make sure you are using a Java VM which is at least version 1.4, and to set the system property java.awt.headless=true. You can manually emulate the uninstaller script by running each uninstaller class in turn, but with the property set
For example:
machine# cd /var/sadm/prod/com.sun.studio10 machine# java -cp . -Djava.awt.headless=true uninstall_Sun_Studio_Software -nodisplay -noconsole machine# java -cp . -Djava.awt.headless=true uninstall_Documentation -nodisplay -noconsole machine# java -cp . -Djava.awt.headless=true uninstall_Source_Distribution -nodisplay -noconsole
In the next release of the product, the uninstall script will automatically take care of this. It will check the JDK version, and if it is suitable, will set the system property automatically, otherwise it will exit with an explanatory message.
Tag: Sun Studio compilers and tools
( Jun 13 2005, 09:45:46 AM PDT ) Permalink Comments [0]