Index: libiscwt-java-5.3.20100629/src/de/intarsys/cwt/font/FontEnvironment.java
===================================================================
--- libiscwt-java-5.3.20100629.orig/src/de/intarsys/cwt/font/FontEnvironment.java	2013-07-03 03:10:21.395832976 +0800
+++ libiscwt-java-5.3.20100629/src/de/intarsys/cwt/font/FontEnvironment.java	2013-07-05 19:05:07.295469597 +0800
@@ -40,7 +40,6 @@
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
-import sun.font.FontManager;
 import de.intarsys.cwt.freetype.Face;
 import de.intarsys.cwt.freetype.Freetype;
 import de.intarsys.cwt.freetype.Library;
@@ -92,6 +91,56 @@
 		return fontFiles.toArray(new File[fontFiles.size()]);
 	}
 
+	
+	// sun.font.FontManager openjdk6
+	// sun.font.SunFontManager openjdk7
+	static boolean mIsOpenJDK6;
+	static Class<?> mClass;
+	static java.lang.reflect.Method mMethod;
+	static Object mContext;
+	static {
+		try {
+			mClass=Class.forName("sun.font.SunFontManager");
+			mIsOpenJDK6=false;
+		} catch (ClassNotFoundException e) {
+			mIsOpenJDK6=true;
+			try {
+				mClass=Class.forName("sun.font.FontManager");
+			} catch (ClassNotFoundException e1) {
+				// should never go here
+				e1.printStackTrace();
+			}
+		}
+		if (mIsOpenJDK6){
+			//definition = FontManager.getFontPath(true);
+			try {
+				mMethod=mClass.getMethod("getFontPath", boolean.class);
+				mContext=null;
+			} catch (SecurityException e) {
+				e.printStackTrace();
+			} catch (NoSuchMethodException e) {
+				e.printStackTrace();
+			}
+		} else {
+			// definition = sun.font.SunFontManager.getInstance().getPlatformFontPath(true); 
+			try {
+				mMethod=mClass.getMethod("getInstance");
+				mContext=mMethod.invoke(null);
+				mMethod=mClass.getMethod("getPlatformFontPath", boolean.class);
+			} catch (NoSuchMethodException e) {
+				e.printStackTrace();
+			} catch (SecurityException e) {
+				e.printStackTrace();
+			} catch (IllegalAccessException e) {
+				e.printStackTrace();
+			} catch (IllegalArgumentException e) {
+				e.printStackTrace();
+			} catch (java.lang.reflect.InvocationTargetException e) {
+				e.printStackTrace();
+			}
+		}
+	}
+
 	/**
 	 * This method determines the system's font directories.
 	 * 
@@ -102,7 +151,17 @@
 		String definition = null;
 		// force FontManager initialization
 		Font.decode("dummy").getFamily(); //$NON-NLS-1$
-		definition = sun.font.SunFontManager.getInstance().getPlatformFontPath(true);
+		try {
+			definition=(String)mMethod.invoke(mContext, true);
+		} catch (IllegalArgumentException e) {
+			e.printStackTrace();
+		} catch (IllegalAccessException e) {
+			e.printStackTrace();
+		} catch (java.lang.reflect.InvocationTargetException e) {
+			e.printStackTrace();
+		} catch (java.lang.ClassCastException e){
+			e.printStackTrace();
+		}
 		if (definition == null) {
 			return new File[0];
 		}
