今天在SL下build JRex,在执行ant make的时候总是出现以下错误:

compile: [javac] Compiling 86 source files to /Users/ijay/Projects/mozilla/embedding/JRex/classes [javac] /Users/ijay/Projects/mozilla/embedding/JRex/src/java/netscape/javascript/JSObject.java:38: ?????? sun.plugin.javascript ?????? [javac] import sun.plugin.javascript.JSContext; [javac] ^ [javac] /Users/ijay/Projects/mozilla/embedding/JRex/src/java/netscape/javascript/JSObject.java:172: ?????? sun.plugin.javascript ?????? [javac] if (c instanceof sun.plugin.javascript.JSContext) [javac] ^ [javac] /Users/ijay/Projects/mozilla/embedding/JRex/src/java/netscape/javascript/JSObject.java:174: ?Ҳ??????? [javac] ???ţ? ?? JSContext [javac] λ?ã? ?? netscape.javascript.JSObject [javac] JSContext j = (JSContext) c; [javac] ^ [javac] /Users/ijay/Projects/mozilla/embedding/JRex/src/java/netscape/javascript/JSObject.java:174: ?Ҳ??????? [javac] ???ţ? ?? JSContext [javac] λ?ã? ?? netscape.javascript.JSObject [javac] JSContext j = (JSContext) c; [javac] ^ [javac] 4 ???? BUILD FAILED

检查了一下build.xml引入的JRex.properties,其中有一行内容如下:

classpath =${build};${java.home}/lib/plugin.jar;${java.home}/lib/deploy.jar;${java.home}/lib/jaws.jar

于是又挨个去找那几个jar包(其中“plugin.jar”最像),最终发现了问题:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/plugin.jar(即“${java.home}/lib/plugin.jar”)是一个符号链接,指向“/System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/Deploy.bundle/Contents/Home/lib/plugin2.jar”,而plugin2.jar不存在…… 把原先的符号链接删除,重建链接指向…/plugin.jar,问题解决 已向apple提交该bug