-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fails with InvalidPathException when launched from Eclipse #79
Comments
I've just tried running a JUnit test under Windows 10 with Eclipse Oxygen and I haven't run into that problem. |
I'm using
path looks like this:
|
Ah, I see. So from my point of view, this looks like a bug in Eclipse, i.e. Eclipse creates a wrong "java.class.path" system property. I've cross checked https://docs.oracle.com/javase/8/docs/technotes/tools/windows/classpath.html where it pretty clearly states, that the classpath should be of the form "C:\foo;C:\bar" and not sth. like "/C:/" so I think Eclipse is at fault here. I've also found another issue with that respect 😉 The combination of some entries of the form "C:..." and some entries of the form "/C:/..." seems strange anyway, I would guess it's some erroneous conversion of URL to path. Originally I was wondering, if I should add more robustness against wrong classpath entries, or not, and decided against it, since I thought clients should just supply valid classpath properties (which so far seemed to work out within IntelliJ, Maven and Gradle). But I see that this is kind of hard to achieve when running tests within Eclipse, since (as far as I know) control over this part of the supplied classpath is limited. I'll make this more robust and add error logging instead, if an invalid file path is encountered within the classpath property. |
…egal paths like older versions of Eclipse sometimes add to the classpath on Windows (e.g. '/C:/some/folder') Issue: #79 Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
…egal paths like older versions of Eclipse sometimes add to the classpath on Windows (e.g. '/C:/some/folder') Issue: #79 Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
…egal paths like older versions of Eclipse sometimes add to the classpath on Windows (e.g. '/C:/some/folder') Issue: #79 Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
I've looked closer into this, and I could reproduce this issue with Eclipse Neon. It seems to be gone with Eclipse Oxygen, though. |
Great thx a lot |
It's on Maven Central now: https://search.maven.org/#search%7Cga%7C1%7Carchunit |
Yep, can confirm, with 0.8.2 everything works fine, thanks a lot. |
…egal paths like older versions of Eclipse sometimes add to the classpath on Windows (e.g. '/C:/some/folder') Issue: TNG#79 Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
…egal paths like older versions of Eclipse sometimes add to the classpath on Windows (e.g. '/C:/some/folder') Issue: #79 Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
I just tried to do a very simple case in my eclipse project and I'm getting an InvalidPathException
It looks like this is a classpath entry that was added by eclipse when running the Junit test. I see that UrlSource is already catching MalformedURLException, should it also catch InvalidPathException?
The text was updated successfully, but these errors were encountered: