昨天在幫一個博士班學生處理 mixed model 的 model diagnostics 問題時,使用 PROC MIXED 程序並配合 ODS GRAPHICS 來產生圖形時,發現 log 裡面出現這一行錯誤訊息:
Java class generated an exception
由於兩年前我在考資格考時還有用過這道指令,記得當時可以順利生出 model diagnostics 的圖形,不過這兩年一直都沒再使用這個功能,所以完全搞不清楚這個錯誤訊息是怎麼跑出來的,因此只好去 SAS 官網上面找看看。果真看到 SAS support 網頁下有說明這個錯誤訊息的源由:
The following messages can appear in the SAS Log when using the JAVAIMG
device driver with ODS GRAPHICS:
Can't load class com/sas/tk/util/SetSTrandardOut.
Can't redirect System.err to SAS log.
Can't load class com/sas/tk/util/SetstandardOut.
Can't redirect System.out to SAS log.
Can't load class com/sas/tk/util/SetStandardOut.
System.out not restored
Can't load class com/sas/tk/util/SetStandardOut.
System.err not restored
Error: Java class generated an exception.The following error is written to the Java console:
java.lang.NoClasDefFoundError: GraphSSR
This problem occurs if a version of the JRE higher than 1.4.1 has been
installed on the system.
To circumvent the problem, remove any version of the JRE that is higher
than 1.4.1. This can be done from ADD/REMOVE PROGRAMS within the
Control Panel on your Windows operating system.