the executableDir will be differently formed if called from a .class or from a .jar. You can see it with the toString() method. Suppose you convert this to a string.
- When called from a .class, it will be formed like this:
which can be correctly accessed
- When called from a .jar, it is like that:
Now if you convert it back to a file, it won't be processed correctly: the 'jar:' prefix will be removed, but not the 'file:' one (apparently it can remove only one prefix). Which explains the weird log posted up there.
The solution for me was simply to add a line of code manipulating the String to remove the 1st characters up to the 1st ':'
But that's still strange no? What do you think of it?