### CI Link

https://gradle-enterprise.elastic.co/s/awqa2s2dkorzs

### Repro line

./gradlew :libs:elasticsearch-core:test --tests "org.elasticsearch.jdk.JarHellTests.testNonJDKModuleURLs" -Dtests.seed=97CC4411A902D87D -Dtests.iters=2

### Does it reproduce?

Yes

### Applicable branches

main

### Failure history

_No response_

### Failure excerpt

> Task :libs:elasticsearch-core:test FAILED

REPRODUCE WITH: ./gradlew ':libs:elasticsearch-core:test' --tests "org.elasticsearch.jdk.JarHellTests.testNonJDKModuleURLs {seed=[97CC4411A902D87D:DC845B02DBE2253]}" -Dtests.seed=97CC4411A902D87D -Dtests.locale=nl -Dtests.timezone=Pacific/Majuro -Druntime.java=20

org.elasticsearch.jdk.JarHellTests > testNonJDKModuleURLs {seed=[97CC4411A902D87D:DC845B02DBE2253]} FAILED
    java.nio.file.InvalidPathException: File name: testNonJDKModuleURLs {seed=[97CC4411A902D87D:DC845B02DBE2253]}-001 contains a reserved character: :: testNonJDKModuleURLs {seed=[97CC4411A902D87D:DC845B02DBE2253]}-001
        at __randomizedtesting.SeedInfo.seed([97CC4411A902D87D:DC845B02DBE2253]:0)
        at org.apache.lucene.tests.mockfile.WindowsPath.checkInvalidPath(WindowsPath.java:58)
        at org.apache.lucene.tests.mockfile.WindowsPath.resolve(WindowsPath.java:42)
        at org.apache.lucene.tests.mockfile.FilterPath.resolve(FilterPath.java:151)
        at java.base/java.nio.file.Path.resolve(Path.java:516)
        at org.apache.lucene.tests.mockfile.FilterPath.resolve(FilterPath.java:156)
        at org.apache.lucene.tests.util.TestRuleTemporaryFilesCleanup.createTempDir(TestRuleTemporaryFilesCleanup.java:286)
        at org.apache.lucene.tests.util.LuceneTestCase.createTempDir(LuceneTestCase.java:3065)
        at org.elasticsearch.jdk.JarHellTests.testNonJDKModuleURLs(JarHellTests.java:124)

libs/core/src/test/java/org/elasticsearch/jdk/JarHellTests.java
* Make sure an old windows classpath with an empty element (implicitly CWD: i'm looking at you 1.x ES scripts) fails
     */
    public void testEmptyClassPathWindows() throws Exception {
        assumeTrue("test is designed for windows-like systems only", ";".equals(System.getProperty("path.separator")));
        assumeTrue("test is designed for windows-like systems only", "\\".equals(System.getProperty("file.separator")));
        try {
            JarHell.parseClassPath(";c:\\element1;c:\\element2");
            fail("should have hit exception");
        } catch (IllegalStateException expected) {
            assertTrue(expected.getMessage().contains("should not contain empty elements"));
        }
    }
    /**
     * Make sure a "bogus" windows classpath element is accepted, java's classpath parsing accepts it,
     * therefore eclipse OSGI code does it :)
     */
    public void testCrazyEclipseClassPathWindows() throws Exception {
        assumeTrue("test is designed for windows-like systems only", ";".equals(System.getProperty("path.separator")));
        assumeTrue("test is designed for windows-like systems only", "\\".equals(System.getProperty("file.separator")));
        Set<URL> expected = asSet(
            PathUtils.get("c:\\element1").toUri().toURL(),
            PathUtils.get("c:\\element2").toUri().toURL(),
            PathUtils.get("c:\\element3").toUri().toURL(),
            PathUtils.get("c:\\element 4").toUri().toURL()
        );
        Set<URL> actual = JarHell.parseClassPath("c:\\element1;c:\\element2;/c:/element3;/c:/element 4");
        assertEquals(expected, actual);
    }
}