Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6785424

SecurityException locating physical fonts on Windows Terminal Server

XMLWordPrintable

    • 2d
    • b03
    • 6
    • b54
    • generic, x86
    • generic, windows_xp
    • Verified

        The following program will throw an exception on some configurations :
        specifically terminal servers such as Citrix where the results of
        GetWindowsDirectory() and GetSystemDirectory() point to different drives

        import java.awt.*;
        import java.awt.image.*;

        public class SF {
            private boolean ranTest;

            public static void main(String[] args) {
               System.setSecurityManager(new SecurityManager());
               Font f = new Font("Verdana", Font.PLAIN, 12);
               BufferedImage bi= new BufferedImage(1,1,1);
               Graphics2D g = bi.createGraphics();
               g.setFont(f);
               System.out.println(g.getFontMetrics());
            }
        }

              prr Philip Race
              prr Philip Race
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: