Edgy Eft + XGL + Beryl + Java App = Crap
I previously had Zend Studio installed on Dapper Drake, and it was fairly easy to get it working, so I figured the same would be the case when I reinstalled Edgy Eft and got Beryl running on it. That's what I get for assuming. I was in for a few surprises.
The first issue I encountered was that the Zend binary for Linux was not finding the proper libraries (most of them libc.so.6) when trying to install in Edgy Eft. A quick search found this article on the Zend support site, which seemed to solve the problem by doing the following to the installer binary:
$ cp ZendStudio-4_2_0.bin ZendStudio-4_2_0.bin.bak
$ cat ZendStudio-4_2_0.bin.bak | \
sed "s/export LD_ASSUME_KERNEL/#xport LD_ASSUME_KERNEL/" > \
ZendStudio-4_2_0.bin
$ rm ZendStudio-4_2_0.bin.bak
This allowed me to execute the installer without the missing library issue, but I soon discovered another problem. Now I was getting an error in finding the JRE. I found this posting that showed how to bypass the JRE that is supposed to work with the installer and instead use the one on my system locate in /usr/bin/java. The command to run the installer is as follows:$ ./ZendStudio-4_2_0.bin LAX_VM /usr/bin/java
Once again, I thought I was in the clear with this one in place, especially when I ran it and the installer seemed to fire up. I was beat down yet again however! Now in the Java swing window that appeared, there was a message saying that the JRE could not be found! Doh! To solve this I went through and installed the J2SE:And also the JDK:$
sudo apt-get install sun-java5-jre sun-java5-plugin
$ sudo apt-get install sun-java5-jdkFinally the installer was successful when running the installer with the local JRE, and seemed to install successfully. Woohoo!
$ sudo update-java-alternatives -s java-1.5.0-sun
Move /usr/lib/jvm/java-1.5.0-sun to the top of the list in /etc/jvm
Crap! When I fired up Zend Studio everything inside the window was gray! What now!? I was able to locate this vague description of the problem, which is apparently due to the lack of support for XGL rendering in older versions of Java, but as you an see from the posting, it is unclear where to place the fix in the ZDE executable (the executable file to start Zend Studio). Well, since the posting was talking about Zend Studio 5.5, I decided I would try installing that and see if line 1695 in that version's ZDE made sense. Alas it didn't, so I decided it was time to get down and dirty, so I dug through the file until I found a good place for it.
Since the addition was to add an option that would use Sun's AWT toolkit when executing the Zend Studio app, I searched the file for the first instance of options, figuring I could add the specified line (options="$options -Dawt.toolkit=sun.awt.motif.MToolkit"), right after the options variable was declared, thereby ensuring that it would always end up in the execution command. I found the first place where it was declared just after this comment section:
####################################################################################
# Determining VM invocation options to use
#
#
# Verification
#
On line 1236 (please don't assume this to be the line where you should stick it), I placed the following command:
options="$options -Dawt.toolkit=sun.awt.motif.MToolkit"
Lo and behold, It finally works! After all that, I think I am going to contact Zend and charge royalties for fixing there broken crap software.