I'm working on a project which include a JEditorPane in which should loaded an html file from project's dir. The problem is that when I build and run the project, all works fine, and the html loads and works without any errors on JEditorPane, but when I build it(without any errors) and use the jar executable I getinstead of loading the file. All other resources(strings, images) loading fine too. This is the code for JEditorPane:IOException->invalid URL
private void bHelpActionPerformed(java.awt.event.ActionEvent evt) { fHelp.setVisible(true); URL pageURL; pageURL = getClass().getResource("/com/soft/snshut/LangChooser.html"); epHelp.setEditable(false); epHelp.addHyperlinkListener(new HyperlingListener()); try { epHelp.setPage(pageURL); }catch(IOException e){ epHelp.setText("IOExecption while loading help page."); } }
Is something I'm doing wrong?