[Libreoffice] [PATCH] Accept using a bin/java that is a symlink
Lionel Elie Mamane
lionel at mamane.lu
Sat Jan 22 10:55:12 PST 2011
I use Debian. A self-compiled libreoffice refuses to use my GNU Java
(gij), saying the directory does not contain a JRE. The Debian package
of libreoffice actually autodetects it and happily uses it, but I have
not easily identified the Debian patch that is responsible for this.
I try to use gij through its compat symlinks in
/usr/lib/jvm/java-1.5.0-gcj-4.4/jre. The patch here-under works for me
to have libreoffice master branch use GNU Java. It "simply" accepts
symlinks as valid bin/java executable. I'm not sure why this code was
set up to refuse symlinks in the first place?
$ ls -l /usr/lib/jvm/java-1.5.0-gcj-4.4/jre/bin/
total 0
lrwxrwxrwx 1 root root 33 jan 11 11:07 gcj-dbtool -> ../../../../../bin/gcj-dbtool-4.4
lrwxrwxrwx 1 root root 26 jan 11 11:07 gij -> ../../../../../bin/gij-4.4
lrwxrwxrwx 1 root root 26 jan 11 11:07 java -> ../../../../../bin/gij-4.4
lrwxrwxrwx 1 root root 31 jan 11 11:07 keytool -> ../../../../../bin/gkeytool-4.4
lrwxrwxrwx 1 root root 28 jan 11 11:07 orbd -> ../../../../../bin/gorbd-4.4
lrwxrwxrwx 1 root root 28 jan 11 11:07 rmid -> ../../../../../bin/grmid-4.4
lrwxrwxrwx 1 root root 35 jan 11 11:07 rmiregistry -> ../../../../../bin/grmiregistry-4.4
lrwxrwxrwx 1 root root 33 jan 11 11:07 tnameserv -> ../../../../../bin/gtnameserv-4.4
---
jvmfwk/plugins/sunmajor/pluginlib/util.cxx | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index 9d55a8e..b3d71a9 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -845,7 +845,7 @@ OUString resolveFilePath(const OUString & path)
FileStatusMask_LinkTargetURL |
FileStatusMask_FileURL);
if (item.getFileStatus(status) == File::E_None
- && status.getFileType() == FileStatus::Regular)
+ && (status.getFileType() == FileStatus::Regular || status.getFileType() == FileStatus::Link ))
{
ret = sResolved;
}
--
1.7.2.3
More information about the LibreOffice
mailing list