--- a/src/de/intarsys/cwt/font/FontEnvironment.java
+++ b/src/de/intarsys/cwt/font/FontEnvironment.java
@@ -93,6 +93,56 @@ public class FontEnvironment {
 		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.
 	 * 
@@ -103,7 +153,17 @@ public class FontEnvironment {
 		String definition = null;
 		// force FontManager initialization
 		Font.decode("dummy").getFamily(); //$NON-NLS-1$
-		definition = 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];
 		}
