### 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
* Side Public License, v 1.
 */
package org.elasticsearch.jdk;
import org.elasticsearch.common.Strings;
import org.elasticsearch.core.PathUtils;
import org.elasticsearch.test.ESTestCase;
import java.io.IOException;
import java.lang.Runtime.Version;
import java.lang.module.ModuleFinder;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.StandardOpenOption;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Set;
import java.util.jar.Attributes;
import java.util.jar.JarOutputStream;
import java.util.jar.Manifest;
import java.util.stream.Collectors;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.endsWith;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasItems;
public class JarHellTests extends ESTestCase {
    URL makeJar(Path dir, String name, Manifest manifest, String... files) throws IOException {
        Path jarpath = dir.resolve(name);