United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6785424 SecurityException locating physical fonts on Windows Terminal Server
JDK-6785424 : SecurityException locating physical fonts on Windows Terminal Server

Details
Type:
Bug
Submit Date:
2008-12-16
Status:
Closed
Updated Date:
2011-03-08
Project Name:
JDK
Resolved Date:
2011-03-08
Component:
client-libs
OS:
generic,windows_xp
Sub-Component:
2d
CPU:
x86,generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
6,6u11
Fixed Versions:

Related Reports
Backport:
Duplicate:

Sub Tasks

Description
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());
    }
}

                                    

Comments
EVALUATION

There is a missing doPrivileged
                                     
2008-12-16



Hardware and Software, Engineered to Work Together