-
Notifications
You must be signed in to change notification settings - Fork 38
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
Cannot load crew_alpha.xml in windows: File separator issue #446
Comments
This issue doesn't surface when running Eclipse launcher. It shows up when running the compiled binary in the command prompt in Windows 10. |
I wonder why getBundledXML() in SimulationConfig doesn't work now. It used to work before in v3.2.0. |
Looks like it has to do with me using Java 17 in my desktop environment. When I change back it to Java 11, the compiled binary can be run and doesn't get terminated. However, it still complains about the following three xml files NOT being found. See
Is it normal ?
|
No it's not normal and odd. The Severe message is not for the file system version but picking the file out of the ZIP file. When accessing resources as stream from the ClassLoader it is best to always use '/' separator.I think I know where the problem is but odd that I've never seen it. |
When used in a ZIP the paths of the resource on the classpath must use forward slash. When running off a file system it is tolerant of back slash as well but this is wrong. #446
Try this commit. Worked OK on my Windows laptop via a ZIP file on command line and via Eclipse. Both using OpenJDK 11. |
Describe the bug
Desktop
Expected behavior
\xml\defaults\crew_alpha.xml
/xml/defaults/crew_alpha.xml
Screenshots
The text was updated successfully, but these errors were encountered: