sample.chm
ユーザーがヘルプ メニュー項目をクリックすると、ファイルを開こうとしています。NetBeans 7.01 を使用しています。クラス ファイルとヘルプ フォルダの両方が次の場所にあります。
NetBeansProjects\MyApplication\src\org\me\myapplication
これはコードです:
private void helpContentsActionPerformed(java.awt.event.ActionEvent evt) {
File f = new File("/help/sample.chm");
try {
Desktop.getDesktop().open(f);
} catch (Exception ex) {
System.out.println(ex);
}
}
エラー:
java.lang.IllegalArgumentException: The file: \help\sample.chm doesn't exist.