views:

531

answers:

2

The following GUI code is working in 99.99% of OS environments used by our customers:

jStatusDescription = new JTextArea();  
jStatusDescription.setFont(new Font("Verdana", Font.PLAIN, 12));   
jStatusDescription.setText("test"); <-- crashes

However, there are now 2 different customers both using Terminal server and firefox 3, the code above gives this exception with Java Plug-in 1.6.0_11 even when ADMIN is logged in and launching firefox.

java.security.AccessControlException: access denied (java.io.FilePermission C:\WINDOWS\Fonts\verdana.TTF read)

Any ideas how to investigate/fix this?

PS: Notice that IE7 works OK for them

+2  A: 

There has been a problem reading physical fonts reported for all current releases of Java SE 6 when running on certain configurations of thin clients. I've not tried, but I guess you can copy the font files into the fonts directory of the JRE (assuming these are checked before the system/Windows directory). You might be able to put reda permission for the TTF file into the lib/security/java.policy file (can't remember how that is organised). Hopefully there will be a fix in a 6 update coming soon (I don't know, and can't promise anything).

Apparent bug CR 6785424 and changeset.

(Include all appropriate disclaimer here...)

Tom Hawtin - tackline
I think you're right, you can include fonts in your JRE, but make sure you have distribution rights for that font first!
Ricardo Villamil
I contacted Sun about this but Signing seem to be one solution, it may be a bug in firefox side, too.
Tom
copying FONT works !
Tom
A: 

copy the font files into the fonts directory of the JRE works for me.

Enviroment: Windows 2003 std ed x86 SP2 with Terminal Service on.