From leventov.ru at gmail.com Wed Jul 10 06:56:23 2019 From: leventov.ru at gmail.com (Roman Leventov) Date: Wed, 10 Jul 2019 09:56:23 +0300 Subject: Update the list of compatible JVMs Message-ID: I've got a warning: WARNING: Not a HotSpot compiler command compatible VM ("LibericaJDK 64-Bit Server VM-12.0.1-BellSoft"), compilerHints are disabled. The relevant part in JMH source: // All OpenJDK/HotSpot VMs are supported static final String[] HINT_COMPATIBLE_JVMS = { "OpenJDK", "HotSpot", "GraalVM" }; // Zing is only compatible from post 5.10.*.* releases static final String JVM_ZING = "Zing"; I didn't check Azul Zulu, Amazon Coretto, AdoptOpenJDK, Red Hat's, and SAP's distributions. From grv87 at yandex.ru Wed Jul 31 19:14:35 2019 From: grv87 at yandex.ru (Basil Peace) Date: Wed, 31 Jul 2019 22:14:35 +0300 Subject: [PATCH]: Still a problem with long classpath on Windows In-Reply-To: <54948071549684012@sas2-2074c606c35d.qloud-c.yandex.net> References: <55598841546996798@myt6-fe24916a5562.qloud-c.yandex.net> <54948071549684012@sas2-2074c606c35d.qloud-c.yandex.net> Message-ID: <21695471564600475@iva1-9be92bdead40.qloud-c.yandex.net> Hi, Aleksey! Is there a problem with proposed patch? Could you take a look? Best regards, Basil Peace 09.02.2019, 06:47, "Basil Peace" : >> ??a) Sign the OCA, as per http://openjdk.java.net/contribute/ > > Done. > >> ??b) Put the patch somewhere on OpenJDK infra. Posting the simple patch in-line in this message would >> ?be good enough. > > Improved patch, using URI for percent encoding: > > # HG changeset patch > # User Basil Peace > # Date 1549196743 -10800 > # Sun Feb 03 15:25:43 2019 +0300 > # Branch hotfix/long-classpath-absolute.v2 > # Node ID fba2e675a44b2b8aaee3fd63aefe926e17fac945 > # Parent 5984e353dca775da0e2208ddaed8427cd9a43acd > fix: fix long classpath issue on Windows with different drives > > diff -r 5984e353dca7 -r fba2e675a44b jmh-core/src/main/java/org/openjdk/jmh/runner/Runner.java > --- a/jmh-core/src/main/java/org/openjdk/jmh/runner/Runner.java Tue Jan 22 16:22:44 2019 +0100 > +++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/Runner.java Sun Feb 03 15:25:43 2019 +0300 > @@ -42,10 +42,13 @@ > > ?import java.io.*; > ?import java.lang.management.ManagementFactory; > +import java.net.URI; > +import java.net.URISyntaxException; > ?import java.nio.channels.FileChannel; > ?import java.nio.channels.FileLock; > ?import java.nio.channels.OverlappingFileLockException; > ?import java.nio.file.Path; > +import java.nio.file.Paths; > ?import java.util.*; > ?import java.util.concurrent.TimeUnit; > ?import java.util.jar.*; > @@ -873,14 +876,25 @@ > ?????????????try { > ?????????????????tmpFile = FileUtils.tempFile("classpath.jar"); > ?????????????????Path tmpFileDir = tmpFile.toPath().getParent(); > + String tmpFileRoot = tmpFileDir.toAbsolutePath().getRoot().toString(); > > ?????????????????StringBuilder sb = new StringBuilder(); > ?????????????????for (String cp : cpProp.split(File.pathSeparator)) { > - String rel = tmpFileDir.relativize(new File(cp).getAbsoluteFile().toPath()).toString(); > - sb.append(rel.replace('\\', '/').replace(" ", "%20")); > - if (!cp.endsWith(".jar")) { > - sb.append('/'); > + Path cpPath = Paths.get(cp).toAbsolutePath(); > + URI cpUri; > + if (cpPath.getRoot().toString().equalsIgnoreCase(tmpFileRoot)) { > + String rel = tmpFileDir.relativize(cpPath).toString(); > + if (File.separatorChar != '/') { > + rel = rel.replace(File.separatorChar, '/'); > + } > + if (!rel.endsWith(".jar")) { > + rel = rel + '/'; > + } > + cpUri = new URI(null, rel, null); > + } else { > + cpUri = cpPath.toUri(); > ?????????????????????} > + sb.append(cpUri.toString()); > ?????????????????????sb.append(" "); > ?????????????????} > ?????????????????String classPath = sb.toString().trim(); > @@ -893,8 +907,10 @@ > ?????????????????try (JarOutputStream jos = new JarOutputStream(new FileOutputStream(tmpFile), manifest)) { > ?????????????????????jos.putNextEntry(new ZipEntry("META-INF/")); > ?????????????????} > - } catch (IOException ex) { > - // Something is wrong in file generation, give up and fall-through to usual thing > + } catch (IOException | URISyntaxException ex) { > + out.println(""); > + out.println(""); > + out.println(""); > ?????????????????tmpFile = null; > ?????????????} > ?????????} > > -- > Best regards, > Basil Peace