### 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
Manifest manifest = new Manifest();
        Attributes attributes = manifest.getMainAttributes();
        attributes.put(Attributes.Name.MANIFEST_VERSION, "1.0.0");
        attributes.put(new Attributes.Name("X-Compile-Target-JDK"), "bogus");
        Set<URL> jars = Collections.singleton(makeJar(dir, "foo.jar", manifest, "Foo.class"));
        var e = expectThrows(IllegalArgumentException.class, () -> JarHell.checkJarHell(jars, logger::debug));
        assertThat(e.getMessage(), equalTo("Invalid version string: 'bogus'"));
    }
    public void testRequiredJDKVersionIsOK() throws Exception {
        Path dir = createTempDir();
        Manifest manifest = new Manifest();
        Attributes attributes = manifest.getMainAttributes();
        attributes.put(Attributes.Name.MANIFEST_VERSION, "1.0.0");
        attributes.put(new Attributes.Name("X-Compile-Target-JDK"), "1.7");
        Set<URL> jars = Collections.singleton(makeJar(dir, "foo.jar", manifest, "Foo.class"));
        JarHell.checkJarHell(jars, logger::debug);
    }
    public void testInvalidVersions() {
        String[] versions = new String[] { "", "1.7.0_80", "1.7." };
        for (String version : versions) {
            expectThrows(IllegalArgumentException.class, () -> JarHell.checkJavaVersion("foo", version));
        }
    }
    
    /**
     * Parse a simple classpath with two elements on unix
     */
    public void testParseClassPathUnix() throws Exception {
        assumeTrue("test is designed for unix-like systems only", ":".equals(System.getProperty("path.separator")));
        assumeTrue("test is designed for unix-like systems only", "/".equals(System.getProperty("file.separator")));