for my college project I'm trying to connect to a HTML-file within my java project, this however has to be uploaded on our college network to our teacher for review... as such I cannot specify the location through "C:/...../help.html"
What is the URL Filepath rule to... say search from within a JAR's root folder?
I've tried simply "help.html", "file://help.html".
The help.html file IS inside my project folder.
I hope this question may be of use to someone else aswell.
Thanks in advance
File.toURL(): Deprecated. This method does not automatically escape characters that are illegal in URLs. It is recommended that new code convert an abstract pathname into a URL by first converting it into a URI, via the toURI method, and then converting the URI into a URL via the URI.toURL method.
non-determined File URL-pathDavid March 23, 2012 at 12:02 PM
for my college project I'm trying to connect to a HTML-file within my java project, this however has to be uploaded on our college network to our teacher for review... as such I cannot specify the location through "C:/...../help.html" What is the URL Filepath rule to... say search from within a JAR's root folder? I've tried simply "help.html", "file://help.html". The help.html file IS inside my project folder. I hope this question may be of use to someone else aswell. Thanks in advance
The use of file.toURL() has been deprecatedGregBrannon October 6, 2012 at 4:49 PM
File.toURL(): Deprecated. This method does not automatically escape characters that are illegal in URLs. It is recommended that new code convert an abstract pathname into a URL by first converting it into a URI, via the toURI method, and then converting the URI into a URL via the URI.toURL method.
Post your Comment