File: warn-fontmanager.patch

package info (click to toggle)
openjdk-25 25~16ea-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 831,448 kB
  • sloc: java: 5,683,507; xml: 1,321,180; cpp: 1,320,301; ansic: 487,129; asm: 404,003; objc: 21,025; sh: 15,223; javascript: 11,105; python: 8,266; makefile: 2,503; perl: 357; awk: 351; sed: 172; pascal: 103; exp: 54; jsp: 24
file content (24 lines) | stat: -rw-r--r-- 934 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Description: print warning to install openjdk-*-jre package
 fontmanager support was moved to recommends, warn user to 
 either install -jre package or recommended packages.
 Forwarding is not needed as this is a Debian-only issue.
Author: Vladimir Petko <vladimir.petko@canonical.com>
Forwarded: not-needed

--- a/src/java.desktop/share/classes/sun/font/FontManagerNativeLibrary.java
+++ b/src/java.desktop/share/classes/sun/font/FontManagerNativeLibrary.java
@@ -52,7 +52,13 @@ public class FontManagerNativeLibrary {
                   shared library in order to avoid dependency. */
            System.loadLibrary("freetype");
        }
-       System.loadLibrary("fontmanager");
+
+       try {
+	   System.loadLibrary("fontmanager");
+       } catch (Throwable t) {
+	   System.err.println("Please install the openjdk-*-jre package or recommended packages for openjdk-*-jre-headless.");
+	   throw t;
+       }
     }
 
     /*