Failed several times in the past few days https://gradle-enterprise.elastic.co/scans/tests?search.timeZoneId=Europe/Zurich&tests.container=org.elasticsearch.jdk.JarHellTests&tests.test=testNonJDKModuleURLs

**Build scan:**
https://gradle-enterprise.elastic.co/s/clidwoim6twwu/tests/:libs:elasticsearch-core:test/org.elasticsearch.jdk.JarHellTests/testNonJDKModuleURLs

**Reproduction line:**
`./gradlew ':libs:elasticsearch-core:test' --tests "org.elasticsearch.jdk.JarHellTests.testNonJDKModuleURLs" -Dtests.seed=E2BD591F7FEB9A87 -Dtests.locale=nl-BE -Dtests.timezone=America/Miquelon -Druntime.java=19`

**Applicable branches:**
master

**Reproduces locally?:**
No

**Failure history:**
https://gradle-enterprise.elastic.co/scans/tests?tests.container=org.elasticsearch.jdk.JarHellTests&tests.test=testNonJDKModuleURLs

**Failure excerpt:**
```
java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessUserInformation")

  at __randomizedtesting.SeedInfo.seed([E2BD591F7FEB9A87:78B958BEFB5760A9]:0)
  at java.security.AccessControlContext.checkPermission(AccessControlContext.java:485)
  at java.security.AccessController.checkPermission(AccessController.java:1068)
  at java.lang.SecurityManager.checkPermission(SecurityManager.java:411)
  at sun.nio.fs.UnixFileAttributeViews$Posix.checkReadExtended(UnixFileAttributeViews.java:186)
  at sun.nio.fs.UnixFileAttributeViews$Posix.readAttributes(UnixFileAttributeViews.java:253)
  at sun.nio.fs.UnixFileAttributeViews$Posix.readAttributes(UnixFileAttributeViews.java:168)
  at sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:148)
  at sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99)
  at org.apache.lucene.tests.mockfile.FilterFileSystemProvider.readAttributes(FilterFileSystemProvider.java:176)
  at org.apache.lucene.tests.mockfile.FilterFileSystemProvider.readAttributes(FilterFileSystemProvider.java:176)
  at org.apache.lucene.tests.mockfile.FilterFileSystemProvider.readAttributes(FilterFileSystemProvider.java:176)
  at org.apache.lucene.tests.mockfile.FilterFileSystemProvider.readAttributes(FilterFileSystemProvider.java:176)
  at org.apache.lucene.tests.mockfile.FilterFileSystemProvider.readAttributes(FilterFileSystemProvider.java:176)
  at java.nio.file.Files.readAttributes(Files.java:1851)
  at java.nio.file.CopyMoveHelper.copyToForeignTarget(CopyMoveHelper.java:114)
  at java.nio.file.Files.copy(Files.java:1308)
  at jdk.internal.module.ModulePath.readModule(ModulePath.java:336)
  at jdk.internal.module.ModulePath.scan(ModulePath.java:237)
  at jdk.internal.module.ModulePath.scanNextEntry(ModulePath.java:190)
  at jdk.internal.module.ModulePath.find(ModulePath.java:154)
  at java.lang.module.Resolver.findWithAfterFinder(Resolver.java:849)
  at java.lang.module.Resolver.resolve(Resolver.java:127)
  at java.lang.module.Configuration.resolve(Configuration.java:421)
  at java.lang.module.Configuration.resolve(Configuration.java:255)
  at org.elasticsearch.jdk.JarHellTests.testNonJDKModuleURLs(JarHellTests.java:126)
  at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
  at java.lang.reflect.Method.invoke(Method.java:577)
  at com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1758)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:946)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$9.evaluate(RandomizedRunner.java:982)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$10.evaluate(RandomizedRunner.java:996)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.apache.lucene.tests.util.TestRuleSetupTeardownChained$1.evaluate(TestRuleSetupTeardownChained.java:44)
  at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
  at org.apache.lucene.tests.util.TestRuleThreadAndTestName$1.evaluate(TestRuleThreadAndTestName.java:45)
  at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
  at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:375)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl.forkTimeoutingTask(ThreadLeakControl.java:824)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$3.evaluate(ThreadLeakControl.java:475)
  at com.carrotsearch.randomizedtesting.RandomizedRunner.runSingleTest(RandomizedRunner.java:955)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$5.evaluate(RandomizedRunner.java:840)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$6.evaluate(RandomizedRunner.java:891)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$7.evaluate(RandomizedRunner.java:902)
  at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.apache.lucene.tests.util.TestRuleStoreClassName$1.evaluate(TestRuleStoreClassName.java:38)
  at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
  at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.apache.lucene.tests.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:53)
  at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
  at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
  at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
  at org.apache.lucene.tests.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:47)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:375)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl.lambda$forkTimeoutingTask$0(ThreadLeakControl.java:831)
  at java.lang.Thread.run(Thread.java:828)

```
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);
    }
}