Problem: JRE/JDK fails to install
Error message: Assertion 'c->xlib.lock' failed
Diagnosis: The file libmawt.so has a known bug that needs to be fixed
Solution:
- Check if the JDK in question is visible throughout the system. For that, execute $ /usr/sbin/alternatives --config java
- If JDK 1.6 is not present, but you are sure you have installed it, execute this: $ /usr/sbin/alternatives/ --install /usr/bin/java java /usr/java/jdk1.6.0_03/jre/bin/java 3
- Copy paste the following code into a plain text file & save it with the extension '.sh' in any folder of your choice
- Right-click on the file. Select Properties > Permissions > Allow executing file as program (Enable)
- Close the dialog
- Double-click the file. Select "Run in Terminal"
#!/bin/sh
# S. Correia
# 2007 11 21
# A simple script to patch the java library in order
# to solve the problem with "Assertion 'c->xlib.lock' failed."
# see bug http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6532373
LIB_TO_PATCH=libmawt.so
for f in `find /usr/java/jdk1.6.0_03/jre/ -name "$LIB_TO_PATCH"`
do
echo "Patching library $f"
sudo sed -i 's/XINERAMA/FAKEEXTN/g' "$f"
done
Points to note:
- The patch will work on "as is" basis only for Fedora 8, while trying to install JRE/JDK 1.6 from the NetBeans DVD. For other OSs / JREs, please modify the path: "/usr/java/jdk1.6.0_03/jre/ " given in the file to point to the directory where the JRE is installed
- The file libmawt.so is present in multiple locations in a JRE and hence, finding each file and patching it manually is not recommended
No comments:
Post a Comment