summaryrefslogtreecommitdiff
path: root/jvmfwk
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-10-20 18:57:27 +0200
committerStephan Bergmann <sbergman@redhat.com>2021-10-20 21:33:53 +0200
commit95c38f6d77f1cb6ff3dc229c5e7130b2e732891d (patch)
treee7e9b7aa240df45aa9843d9e02d6609f49e850f6 /jvmfwk
parent67c15910606575b862410179698f81e7a598aa44 (diff)
Drop support for dead GNU Java
...which no longer worked anyway at least since aafc10c9edb61e13ac557c7e43c8d4a31dce4f37 "Bump Java baseline to Java 8": According to <https://en.wikipedia.org/wiki/GNU_Compiler_for_Java>, the last version of GCC providing Java was GCC 6.5. But trying to add a build of that ("Tools - Options... - LibreOffice - Advanced - Java Options - Add...") would already have failed before this commit due to a java.lang.ClassFormatError ("JREProperties (unrecognized class file version)") when executing the JREProperties code compiled with --release 8. (Whereas now it fails because it cannot even determine a JRE installation there according to the SunInfo rather than GnuInfo rules used for the now-unknown vendor.) The <updated> elements of the modified jvmfwk/distributions/OpenOfficeorg/javavendors_*.xml have not been updated in line with the rules documented at the end of jvmfwk/README.md: As mentioned above, a GNU Java JRE cannot have been selected prior to this commit anyway, so even though this is nominally an incompatible change of the xml files, actually updating <updated> would only have negative ("just annoying if an already selected JRE is still supported") but no positive consequences. Change-Id: Ica245677dae977360bdb3c6544897eb060c3f844 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123906 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'jvmfwk')
-rw-r--r--jvmfwk/Library_jvmfwk.mk1
-rw-r--r--jvmfwk/distributions/OpenOfficeorg/javavendors_freebsd.xml3
-rw-r--r--jvmfwk/distributions/OpenOfficeorg/javavendors_linux.xml3
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx280
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/gnujre.hxx47
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx2
6 files changed, 0 insertions, 336 deletions
diff --git a/jvmfwk/Library_jvmfwk.mk b/jvmfwk/Library_jvmfwk.mk
index eede8f4503c3..9928b0db7c1b 100644
--- a/jvmfwk/Library_jvmfwk.mk
+++ b/jvmfwk/Library_jvmfwk.mk
@@ -68,7 +68,6 @@ $(eval $(call gb_Library_add_libs,jvmfwk,\
endif
$(eval $(call gb_Library_add_exception_objects,jvmfwk,\
- jvmfwk/plugins/sunmajor/pluginlib/gnujre \
jvmfwk/plugins/sunmajor/pluginlib/otherjre \
jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin \
jvmfwk/plugins/sunmajor/pluginlib/sunjre \
diff --git a/jvmfwk/distributions/OpenOfficeorg/javavendors_freebsd.xml b/jvmfwk/distributions/OpenOfficeorg/javavendors_freebsd.xml
index 89ffc08ffc8d..0b41b60a9cab 100644
--- a/jvmfwk/distributions/OpenOfficeorg/javavendors_freebsd.xml
+++ b/jvmfwk/distributions/OpenOfficeorg/javavendors_freebsd.xml
@@ -28,9 +28,6 @@
<vendor name="The FreeBSD Foundation">
<minVersion>1.8.0</minVersion>
</vendor>
- <vendor name="Free Software Foundation, Inc.">
- <minVersion>1.8.0</minVersion>
- </vendor>
<vendor name="AdoptOpenJdk">
<minVersion>1.8.0</minVersion>
</vendor>
diff --git a/jvmfwk/distributions/OpenOfficeorg/javavendors_linux.xml b/jvmfwk/distributions/OpenOfficeorg/javavendors_linux.xml
index ad9d287a62a7..22f73a7dc6bb 100644
--- a/jvmfwk/distributions/OpenOfficeorg/javavendors_linux.xml
+++ b/jvmfwk/distributions/OpenOfficeorg/javavendors_linux.xml
@@ -31,9 +31,6 @@
<vendor name="Blackdown Java-Linux Team">
<minVersion>1.8.0</minVersion>
</vendor>
- <vendor name="Free Software Foundation, Inc.">
- <minVersion>1.8.0</minVersion>
- </vendor>
<vendor name="BEA Systems, Inc.">
<minVersion>1.8.0</minVersion>
</vendor>
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx b/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx
deleted file mode 100644
index 1003e6eec411..000000000000
--- a/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx
+++ /dev/null
@@ -1,280 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-
-#include <osl/file.hxx>
-#include "gnujre.hxx"
-#include "util.hxx"
-
-using namespace osl;
-using ::rtl::Reference;
-
-namespace jfw_plugin
-{
-
-Reference<VendorBase> GnuInfo::createInstance()
-{
- return new GnuInfo;
-}
-
-char const* const* GnuInfo::getJavaExePaths(int * size)
-{
- static char const * ar[] = {
- "gij",
- "bin/gij",
- "gij-4.3",
- "bin/gij-4.3",
- "gij-4.2",
- "bin/gij-4.2",
- "gij-4.1",
- "bin/gij-4.1"
- };
- *size = SAL_N_ELEMENTS (ar);
- return ar;
-}
-
-#if defined(MIPS) && defined(OSL_LITENDIAN)
-constexpr OUStringLiteral GCJ_JFW_PLUGIN_ARCH = u"mipsel";
-#elif defined(MIPS64) && defined(OSL_LITENDIAN)
-constexpr OUStringLiteral GCJ_JFW_PLUGIN_ARCH = u"mips64el";
-#else
-#define GCJ_JFW_PLUGIN_ARCH JFW_PLUGIN_ARCH
-#endif
-
-char const* const* GnuInfo::getRuntimePaths(int * size)
-{
- static char const* ar[]= {
- "/libjvm.so",
- "/lib/" GCJ_JFW_PLUGIN_ARCH "/client/libjvm.so",
- "/gcj-4.1.1/libjvm.so",
- "/gcj-4.3-90/libjvm.so",
- "/gcj-4.2-81/libjvm.so",
- "/gcj-4.2/libjvm.so",
- "/gcj-4.2.1/libjvm.so",
- "/gcj-4.2.2/libjvm.so",
- "/gcj-4.2.3/libjvm.so",
- "/gcj-4.1-71/libjvm.so",
- "/gcj-4_1/libjvm.so",
- "/gcj-4.1/libjvm.so",
- "/libgcj.so.81",
- "/libgcj.so.80",
- "/libgcj.so.8",
- "/libgcj.so.71",
- "/libgcj.so.70",
- "/libgcj.so.7",
- "/libgcj.so.6"
- };
- *size = SAL_N_ELEMENTS(ar);
- return ar;
-}
-
-char const* const* GnuInfo::getLibraryPaths(int* /*size*/)
-{
- return nullptr;
-}
-
-bool GnuInfo::initialize(const std::vector<std::pair<OUString, OUString> >& props)
-{
- //get java.vendor, java.version, java.home
- //from system properties
-
- OUString sJavaLibraryPath;
- OUString const sVendorProperty("java.vendor");
- OUString const sVersionProperty("java.version");
- OUString const sJavaHomeProperty("java.home");
- OUString const sJavaLibraryPathProperty("java.library.path");
- OUString const sGNUHomeProperty("gnu.classpath.home.url");
-
- bool bVersion = false;
- bool bVendor = false;
- bool bHome = false;
- bool bJavaHome = false;
- bool bJavaLibraryPath = false;
-
- for (auto const& prop : props)
- {
- if(! bVendor && sVendorProperty == prop.first)
- {
- m_sVendor = prop.second;
- bVendor = true;
- }
- else if (!bVersion && sVersionProperty == prop.first)
- {
- m_sVersion = prop.second;
- bVersion = true;
- }
- else if (!bHome && sGNUHomeProperty == prop.first)
- {
- m_sHome = prop.second;
- bHome = true;
- }
- else if (!bJavaHome && sJavaHomeProperty == prop.first)
- {
- OUString fileURL;
- if (osl_getFileURLFromSystemPath(prop.second.pData,& fileURL.pData) ==
- osl_File_E_None)
- {
- //make sure that the drive letter have all the same case
- //otherwise file:///c:/jre and file:///C:/jre produce two
- //different objects!!!
- if (makeDriveLetterSame( & fileURL))
- {
- m_sJavaHome = fileURL;
- bJavaHome = true;
- }
- }
- }
- else if (!bJavaLibraryPath && sJavaLibraryPathProperty == prop.first)
- {
- sal_Int32 nIndex = 0;
- osl_getFileURLFromSystemPath(prop.second.getToken(0, ':', nIndex).pData, &sJavaLibraryPath.pData);
- bJavaLibraryPath = true;
- }
- if (bVendor && bVersion && bHome && bJavaHome && bJavaLibraryPath) {
- break;
- }
- }
- if (!bVersion || !bVendor || !bHome)
- return false;
-
- if (m_sJavaHome.isEmpty())
- m_sJavaHome = "file:///usr/lib";
-
- // init m_sRuntimeLibrary
- OSL_ASSERT(!m_sHome.isEmpty());
- //call virtual function to get the possible paths to the runtime library.
-
- int size = 0;
- char const* const* arRtPaths = getRuntimePaths( & size);
- std::vector<OUString> libpaths = getVectorFromCharArray(arRtPaths, size);
-
- bool bRt = false;
- for (auto const& libpath : libpaths)
- {
- //Construct an absolute path to the possible runtime
- OUString usRt= m_sHome + libpath;
- DirectoryItem item;
- if(DirectoryItem::get(usRt, item) == File::E_None)
- {
- //found runtime lib
- m_sRuntimeLibrary = usRt;
- bRt = true;
- break;
- }
- }
-
- if (!bRt)
- {
- m_sHome = m_sJavaHome;
- for (auto const& libpath : libpaths)
- {
- //Construct an absolute path to the possible runtime
- OUString usRt= m_sHome + libpath;
- DirectoryItem item;
- if(DirectoryItem::get(usRt, item) == File::E_None)
- {
- //found runtime lib
- m_sRuntimeLibrary = usRt;
- bRt = true;
- break;
- }
- }
- }
-
- // try to find it by the java.library.path property
- if (!bRt && m_sJavaHome != sJavaLibraryPath)
- {
- m_sHome = sJavaLibraryPath;
- for (auto const& libpath : libpaths)
- {
- //Construct an absolute path to the possible runtime
- OUString usRt= m_sHome + libpath;
- DirectoryItem item;
- if(DirectoryItem::get(usRt, item) == File::E_None)
- {
- //found runtime lib
- m_sRuntimeLibrary = usRt;
- bRt = true;
- break;
- }
- }
- }
-
-#ifdef X86_64
- //Make one last final legacy attempt on x86_64 in case the distro placed it in lib64 instead
- if (!bRt && m_sJavaHome != "file:///usr/lib")
- {
- m_sHome = "file:///usr/lib64";
- for (auto const& libpath : libpaths)
- {
- //Construct an absolute path to the possible runtime
- OUString usRt= m_sHome + libpath;
- DirectoryItem item;
- if(DirectoryItem::get(usRt, item) == File::E_None)
- {
- //found runtime lib
- m_sRuntimeLibrary = usRt;
- bRt = true;
- break;
- }
- }
- }
-#endif
-
- if (!bRt)
- return false;
-
- // init m_sLD_LIBRARY_PATH
- OSL_ASSERT(!m_sHome.isEmpty());
- size = 0;
- char const * const * arLDPaths = getLibraryPaths( & size);
- std::vector<OUString> ld_paths = getVectorFromCharArray(arLDPaths, size);
-
- bool bLdPath = true;
- int c = 0;
- for (auto const& ld_path : ld_paths)
- {
- OUString usAbsUrl= m_sHome + ld_path;
- // convert to system path
- OUString usSysPath;
- if(File::getSystemPathFromFileURL(usAbsUrl, usSysPath) == File::E_None)
- {
-
- if(c > 0)
- m_sLD_LIBRARY_PATH+= OUStringChar(SAL_PATHSEPARATOR);
- m_sLD_LIBRARY_PATH+= usSysPath;
- }
- else
- {
- bLdPath = false;
- break;
- }
- ++c;
- }
- return bLdPath;
-}
-
-int GnuInfo::compareVersions(const OUString&) const
-{
- return 0;
-}
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/gnujre.hxx b/jvmfwk/plugins/sunmajor/pluginlib/gnujre.hxx
deleted file mode 100644
index 5d2f78d1fd17..000000000000
--- a/jvmfwk/plugins/sunmajor/pluginlib/gnujre.hxx
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_JVMFWK_PLUGINS_SUNMAJOR_PLUGINLIB_GNUJRE_HXX
-#define INCLUDED_JVMFWK_PLUGINS_SUNMAJOR_PLUGINLIB_GNUJRE_HXX
-
-#include <vendorbase.hxx>
-
-namespace jfw_plugin
-{
-class GnuInfo : public VendorBase
-{
-private:
- OUString m_sJavaHome;
-
-public:
- static char const* const* getJavaExePaths(int* size);
-
- static rtl::Reference<VendorBase> createInstance();
-
- virtual char const* const* getRuntimePaths(int* size) override;
-
- virtual char const* const* getLibraryPaths(int* size) override;
-
- virtual bool initialize(const std::vector<std::pair<OUString, OUString>>& props) override;
- virtual int compareVersions(const OUString& sSecond) const override;
-};
-}
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx b/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx
index b68152e80906..380a98f8e6cb 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx
@@ -19,7 +19,6 @@
#include "vendorlist.hxx"
-#include "gnujre.hxx"
#include "sunjre.hxx"
#include "otherjre.hxx"
@@ -45,7 +44,6 @@ VendorSupportMapEntry const gVendorMap[] ={
VENDOR_MAP_ENTRY<OtherInfo>("IBM Corporation"),
VENDOR_MAP_ENTRY<OtherInfo>("Blackdown Java-Linux Team"),
VENDOR_MAP_ENTRY<OtherInfo>("BEA Systems, Inc."),
- VENDOR_MAP_ENTRY<GnuInfo>("Free Software Foundation, Inc."),
VENDOR_MAP_ENTRY<OtherInfo>("The FreeBSD Foundation"),
#endif
{nullptr, nullptr, nullptr} };