Specifically, I\'m trying to create a unit test for a method which requires uses File.separatorChar to build paths on windows and unix. The code must run on bot
You can take the source for java.io.File, and modify it so that separatorChar and separator are not final, and add a setSeparatorChar method that updates the two of them, then include the compiled class in your bootclasspath.