I want to add html files to jar files and access them through jar in the windows application
project how can i access them
I am using the following code .
try{
File f1= new File(getClass.getResource("/path is the src folder/));
}
but it is showing no suitable constructor found
Filewon’t take aURLas reference. Embedded resources like this aren’t actually files, they areInputStreams to the resource.Depending on how you’re showing them will determine what you need to do.
For example,
JEditorPanetakes aURLvia itssetPagemethodUPDATED
You should be able to load the pages directly into the editor pane using something like…