From: Gerd M. <Ger...@sm...> - 2003-12-09 11:19:05
|
On Mon, 08 Dec 2003 15:51:34 +0100 "Joerg K. Wegner" <we...@in...> wrote: > Hi Gerd, > > > and try to load a molecule from a file I get an error that > > joelib can't load the file atomtypes.txt although the jar contains > > it. If I unpack joelib.jar it works. > > I found out that the error occurs if the jar resists in a directory > > with whitespaces in the pathname. Also I saw that > > wsi.ra.tools.ResourceLoader replaces '%20' in the pathname with ' ' which > > seems to be the problem here. Why is this done ? Any hints for fixing this > > problem ? > > 111. As you can see also the replacement takes only an effect for > 'files' which are not contained in a .zip or .jar file ! Yes, and this seems to be the problem. I've used java.net.URLDecoder to decode the urlToZipArchive in getBytesFromArchive() and everything works fine. So the solution seems to be move the '%20' replacement code a few lines up, so that also archive paths are handled. Also I would recomment to use java.net.URLDecoder instead of using regexp. This way you don't need to care about other %-sign that may occur. best regards, gerd ________________________________________________________________ Gerd Mueller ge...@sm... SMB GmbH http://www.smb-tec.com |