Mac OS X用Eclipse(Gallileo)の「HTTPプレビュー」機能が動かない件
Eclipseのサーバー機能の一つに、HTTPプレビューってのがあるんだが、

EclipseのMac版Gallileoでこれを実行しようとしても、
エラーが出て全く動く気配がない。

で、原因を探るためにエラーで調べてみたら、こんなページが。
あるJavaのソース。
http://eclipsesrc.appspot.com/jsrcs/org.eclipse.wst.server.preview.adapter/src/org/eclipse/wst/server/preview/adapter/internal/core/PreviewLaunchConfigurationDelegate.java.html
ログにも、この「org.eclipse.wst.server.preview.adapter」のプラグインが、
エラーの原因となっているということだったので、多分関係あると思われる。
で、例のエラーメッセージがある部分のコード。
getJavaExecutableメソッドの返り値がnullだったらこの例外が出るっぽい。
File java = getJavaExecutable();
if (java == null)
throw new CoreException(new Status(IStatus.ERROR, PreviewPlugin.PLUGIN_ID, "Could not find JRE executable"));
if (java == null)
throw new CoreException(new Status(IStatus.ERROR, PreviewPlugin.PLUGIN_ID, "Could not find JRE executable"));
で、肝心のgetJavaExecutable();のコードはこちら。
protected static File getJavaExecutable() {
// do not detect on the Mac OS
if (Platform.getOS().equals(Constants.OS_MACOSX))
return null;
// do not detect on the Mac OS
if (Platform.getOS().equals(Constants.OS_MACOSX))
return null;
うわー。
Macだと強制nullですな。
あと、Eclipseのバグ293398に、このエラーが登録されている。
何か、最終的には担当者がMac持ってないからとかでストップしている。
ということで、結論としてはMac版Eclipse Gallileoでは
HTTPプレビュー見れないっぽい。




