Running the program on Linux throws always an exception
Exception in thread "main"
java.lang.StringIndexOutOfBoundsException: String index
out of range: -25
at java.lang.String.substring(String.java:1480)
at net.bacman.xsldoc.XSLdoc.createNav(XSLdoc.java:256)
at net.bacman.xsldoc.XSLdoc.main(XSLdoc.java:148)
When I look in the source code I noticed that the
problem may be in handling \ signs (path separations in
Windows). I'm not a professional but I thought that
path separator in Java is always / and is transparently
handled by VM.
My system settings:
Linux atanazy 2.4.22-athlon #1 czw paź 9 17:28:54 CEST
2003 i686 GNU/Linux
Java(TM) 2 Runtime Environment, Standard Edition (build
1.4.1_05-b01), Java HotSpot(TM) Client VM (build
1.4.1_05-b01, mixed mode)
Thank you in advance
Marcin
Logged In: YES
user_id=846246
To tighten up the terminology, the path separator is the
character that delimits items on the PATH; i.e. the
environment variable that is searched for executables /
scripts. This is different on Windows and Unix.
The specific problem here is with file separators, used to
delimit directories in a file name. The assertion that path
handling is hard-coded to use the Windows separator char
looks to be correct. I'll fix and test on my Linux box to
confirm, then I'd like to submit a patch. The source tree
doesn't appear to be in Sourceforge CVS though - just as
part of the distributed jar file?
How would you like a patch to be submitted?
Regards,
James