M
Michael J. Hudson
So, I had some HTML files in a jar file that my application was using
as help files. In those HTML files, I had links to other internal
HTML files as well as links to JPGs and such. In any case, certain
links were not working. When I unzipped the jar, and ran my
application that way (outside of the jar) everything worked fine.
What was going wrong?
The original HTML link looked something like this:
<a link href="my%20link.html">my link</a>
It took a little while, but I eventually figured out what was going
on. The %20 was messing everything up. For whatever reason, outside
of the JAR, the %20 was accurately being translated to mean a "space",
but inside the JAR it was using those characters literally, %, 2, 0.
In my case, these HTML files were created through a macro I was using
in Microsoft Word. If I wasn't doing that, I could have probably just
directly replaced the "%20" with an actual space in those "href"
attributes. When I experimented with this... this did work. However,
in my case, these links were being automatically created. So, I just
had to change the way I set things up so that all the files being
created had no spaces, e.g. I used an underline instead of a space.
And once I did that, it worked... both inside and outside of the jar.
Woohoo!!!
Anyway... just passing this on into the ether in case someone else out
there ever has similar problems.
-Michael
as help files. In those HTML files, I had links to other internal
HTML files as well as links to JPGs and such. In any case, certain
links were not working. When I unzipped the jar, and ran my
application that way (outside of the jar) everything worked fine.
What was going wrong?
The original HTML link looked something like this:
<a link href="my%20link.html">my link</a>
It took a little while, but I eventually figured out what was going
on. The %20 was messing everything up. For whatever reason, outside
of the JAR, the %20 was accurately being translated to mean a "space",
but inside the JAR it was using those characters literally, %, 2, 0.
In my case, these HTML files were created through a macro I was using
in Microsoft Word. If I wasn't doing that, I could have probably just
directly replaced the "%20" with an actual space in those "href"
attributes. When I experimented with this... this did work. However,
in my case, these links were being automatically created. So, I just
had to change the way I set things up so that all the files being
created had no spaces, e.g. I used an underline instead of a space.
And once I did that, it worked... both inside and outside of the jar.
Woohoo!!!
Anyway... just passing this on into the ether in case someone else out
there ever has similar problems.
-Michael