[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Works in Linux but not in Windows.



Yes, I had a problem like this two years ago.  It was recorded as
JitterBug PR#30, and Patrick fixed it.  The problem was that absolute
paths in dos/windows start with a drive letter and a colon.  The solution
involved these two lines:

if(classPath.indexOf(fileSeparator) == 0 ||
    (isRunningUnderBraindeadOS && classPath.charAt(1) == ':'))

private static boolean isRunningUnderBraindeadOS =
    System.getProperty("os.name").startsWith("Windows");


I suspect that the similar problem has simply snuck back in at some point
over the last two years.  I suggest that you take a look at the line where
the problem is with this in mind:

    soot.util.SourceLocator.getInputStreamOf(SourceLocator.java:117)

If this is in fact the issue, it should be fairly easy to fix.  In fact,
that hard-coded check of charAt(1) may be the problem itself, since your
exception reports index out of bounds at 1.


Derek.