As reported in http://ubuntuforums.org/showthread.php?t=675265&highlight=drjava
many people have the same problem running DrJava on Linux. DrJava just restart the X server when you try to type anything. I tried different DrJava versions with different JDK version. All the tries result in the same problem. X server restarts.
Logged In: YES
Can anyone here reproduce this problem? Also, on the linked forum someone claimed:
"I tried many versions from DrJava and i found one that works great. Just download DrJava Version : 20061025-1556... It works great..."
What have we changed since 2006 that would make DrJava not work on Ubuntu?
Logged In: YES
Installed on Ubuntu Hardy, Sun JDK 6 and I get the same problem. Particularly the command to create a new file as the first command issued kills X. It's not 100% consistent, but opening dialogs, or creating files on freshly opened instance usually does it.
The older version mentioned on the Ubuntu forums (20061025.stable) doesn't seem to have the problem.
syslog reveals that compiz is segfaulting:
Jul 25 00:21:16 x1 kernel: [14813.216058] compiz.real: segfault at 3f800008 eip 08055a6d esp bf85dd30 error 4
Jul 25 00:21:16 x1 gdm: WARNING: gdm_slave_xioerror_handler: Fatal X error - Restarting :0
Setting the visual effects to "None" (i.e., disabling compiz) seems to cure the problem.
This is the second time I see compiz (a composing window manager) mentioned in a bug report. A Google search on "compiz java crash" revealed quite a few reports, so I'm just confident as before that this is not a DrJava problem, but an incompatibility between compiz and Sun's Linux implementation of Java.
Among the search results was this one: https://bugs.launchpad.net/ubuntu/+bug/164004
It recommended exporting AWT_TOOLKIT="MToolkit":
Please try that and let us know if it works.
I was heading in the same direction - thanks for finding the workaround.
Yes, exporting AWT_TOOLKIT="MToolkit" does seem to correct the problem, at least on Ubuntu Hardy 8.04 32 bit, using the latest stable version of drjava.
I'll post this on the Ubuntu forums as well.
Thank you for verifying this, Vern, and thanks for using DrJava!
Now considered a duplicate of bug report:
[ 1875038 ] DrJava hardlocks the machine when Compiz is used