Steve: Developing on the Edge - Java6 breaks open office
Steve: Developing on the Edge
Thoughts on development, Web-services, technology and mountains.
16Feb
Fri2007
Java6 breaks open office

This is so silly I will have to wallow in the irony of for the rest of the day. Installing Java 6 on linux stops you being able to open openoffice files on linux.

This is quite a complicated failure. It stems from this feature, which aims to make all .jar files magically executable. Suddenly you can run it, even on the command line.

Only, JAR files are .zip files with a MANIFEST subdir. And what, pray tell, are .SXW files? That's right, .zip files with a MANIFEST subdir. oops. And whatever opens files under Nautilus, sees that this file is marked as an executable, starts to run it then immediately flags something is not quite right. A feature that was designed to make it easier to run Java has the side effect of breaking desktop integration with Open Office.

As a software developer, I've done my fair share of things with unexpected side effects. Usually it happens with apps you don't test. But look at this. Java 6: Sun. Gnome/Nautilus: part of the "Java Desktop": Sun. Open Office: Sun. Seems like a bit more internal testing would have caught this.

Having looked at /etc/init.d/jexec, it is registering the PKZIP file type with something called binfmt_misc. A quick rm /etc/rc1.d/S20jexec may make things return to normal after the next reboot.

updated corrected the rm statement, as suggested.

Comments

On 16 February 2007 at 18: 44 Anonymous commented:
I can't imagine how "rm /etc/rc1.d/K20jexec" will fix this; that path indicates a symlink that will cause jexec will be _killed_ when entering _runlevel 1_, while what you actually want (i'm guessing) is to stop it from getting STARTED in another runlevel. "man update-rc.d" might tell you something, depending on what distro you're running.
This bug is absurd. Sun sucks, and is clearly hurting desktop Linux with their carelessness. How could they release something like that?!
On 16 February 2007 at 20: 00 Steve Loughran commented:
I stand corrected. It is rm S20jexec.
Clearly I have much more linux sysadmin to deal with.
and yes, it is a painful little bug
Details pleasereply to this thread
On 16 February 2007 at 21: 44 Mark Reinhold commented:
We're digging into this now. Could you please provide a few more
details?
What Linux distribution are you using, and what version?
How did you install the JRE/JDK? Via rpm, the self-extracting binary,
JPackage, apt-get, or something else?
Are the execute bits on your .sxw file set?
Thanks.
On 17 February 2007 at 00: 26 Anonymous commented:
You had better not be implying this would OK if the execute bit is set, because on some filesystems (Samba, FAT, ISO9660, etc) in some configurations every file has that bit set, and it can't be helped. OpenOffice users cannot be expected to find a way to remove the x bit from their file before they can open it; especially considering that in many common use cases the only way would be to make a copy of the file.
Unrelated rant: this blog's requirement of JavaScript for posting almost stopped me from commenting at all. Almost. Google for "DEGRADE GRACEFULLY", please. It isn't that difficult!
On 17 February 2007 at 08: 47 Steve Loughran commented:
Anoymous
-no, not exe bit related. Its an ubuntu install problem
-sorry about the jscript requirements. I think if the web browsers supported xforms direct that requirement would go away.
Known bug, with workaround; use apt-get insteadreply to this thread
On 17 February 2007 at 05: 45 Mark Reinhold commented:
The problem you describe most likely has absolutely nothing to do with
binfmt_misc or the "direct execution of jar files on Linux" feature [1].
What you're seeing is consistent with bug 6510610 [2], which is a syntax
error in the file /usr/share/mime/packages/x-java-archive.xml that's
installed by the Sun RPM. That error causes Nautilus to identify all
Zip archives as Java archives, which is why it displays the dialog box
you show above. (Note: OpenOffice is not "broken" -- opening a file
directly from OpenOffice will still work.)
A workaround for this bug is documented in the report [2], and the bug
will be fixed in Sun's JDK 6 update 2 as well as in JDK 7.
You mentioned privately that you're using Ubuntu 6.06, so rather than
install JDK 6 from Sun's RPM file with the "alien" tool I suggest that
you instead enable the "dapper-backports" repository [3] and then either
"apt-get install sun-java6-jre" (for the JRE only) or "apt-get install
sun-java6-jdk" (for the full JDK). This will get you an installation
customized for Ubuntu (courtesy of the DLJ [4]) which, happily, doesn't
propagate 6510610. (Note: Java SE 6 is not yet officially supported by
Ubuntu.)
On 17 February 2007 at 08: 46 Steve Loughran commented:
Mark,
thank you, I will test that out next week.