Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-3844

Native bundles cannot be installed on Windows 8 and Windows Server 2012

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • framework-4.0.3
    • framework-4.2.0
    • Framework

    Description

      "osname=win32" in the Bundle-NativeCode entry doe not work, this exception is thrown:org.osgi.framework.BundleException: Unresolved constraint in bundle native-lib-windows-x86 [6]: No matching native libraries found.

      This osname alias needs to be added to the felix framework. I made some changes according to the OSGI specifications at http://www.osgi.org/Specifications/Reference .

      Here is the patch:

      Index: src/main/java/org/apache/felix/framework/util/manifestparser/R4LibraryClause.java
      ===================================================================
      — src/main/java/org/apache/felix/framework/util/manifestparser/R4LibraryClause.java (revision 1431008)
      +++ src/main/java/org/apache/felix/framework/util/manifestparser/R4LibraryClause.java (working copy)
      @@ -140,11 +140,13 @@

      currentOSName.equals("windowsnt")
      currentOSName.equals("windows2000")
      currentOSName.equals("windows2003")
      currentOSName.equals("windows2008")
      +
      currentOSName.equals("windowsserver2008")
      currentOSName.equals("windowsxp")
      currentOSName.equals("windowsce")
      currentOSName.equals("windowsvista")
      currentOSName.equals("windows7"));
      +
      currentOSName.equals("windows7")
      +
      currentOSName.equals("windows8")
      +
      currentOSName.equals("windowsserver2012"));

      for (int i = 0; (osnames != null) && (i < osnames.length); i++)

      { @@ -381,7 +383,11 @@ }

      else if (value.indexOf("2008") >= 0)

      { - os = "windows2008"; + os = "windowsserver2008"; + }

      + else if (value.indexOf("2012") >= 0)
      +

      { + os = "windowsserver2012"; }

      else if (value.indexOf("xp") >= 0)

      { @@ -396,10 +402,15 @@ os = "windowsvista"; }

      // will need better test here if any future Windows version has a 7 in it!

      • else if (value.indexOf("7") >= 0)
        + else if (value.indexOf(" 7") >= 0 || value.equals("win7")) { os = "windows7"; }

        + else if (value.indexOf(" 8") >= 0 || value.equals("win8"))
        +

        { + os = "windows8"; + }

        +
        return os;
        }
        else if (value.startsWith("linux"))

      Attachments

        Activity

          People

            rickhall Richard S. Hall
            nroduit Nicolas Roduit
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: