Dmitry, I'd reproduced it. I'll check what is happening.
-Dmitry On 2016-09-15 15:34, Dmitry Dmitriev wrote: > Hi Dmitry, > > I don't think that this solves the problem. If some test build > testlibrary before TestJpsJar.java, then testlibrary classes will be > outside the folder with JpsHelper class and thus missed in the jar file. > > I can reproduce this problem with your patch applied: > 1) Run sun/tools/jinfo/BasicJInfoTest.java in clean folder > 2) Then run sun/tools/jps/TestJpsJar.java. TestJpsJar.java fails with > following error: > stderr: [Exception in thread "main" java.lang.NoClassDefFoundError: > jdk/testlibrary/ProcessTools > at JpsBase.main(JpsBase.java:73) > Caused by: java.lang.ClassNotFoundException: jdk.testlibrary.ProcessTools > at > jdk.internal.loader.BuiltinClassLoader.loadClass(java.base@9-internal/BuiltinClassLoader.java:366) > > at > jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(java.base@9-internal/ClassLoaders.java:185) > > at > java.lang.ClassLoader.loadClass(java.base@9-internal/ClassLoader.java:424) > ... 1 more > ] > exitValue = 1 > > java.lang.RuntimeException: Expected to get exit value of [0] > > Thanks, > Dmitry > > On 15.09.2016 15:18, Dmitry Samersoff wrote: >> Everybody, >> >> Please, review the small fix. >> >> http://cr.openjdk.java.net/~dsamersoff/JDK-8165500/webrev.01/ >> >> The problem: >> >> TestJpsJar attempts to copy all directories found in test.class.path >> into a single jar file. >> >> It's not necessary and could lead to intermittent ClassNotFound >> exceptions. >> >> Solution: >> >> Jar only a directory with required files. >> >> -Dmitry >> >> > -- Dmitry Samersoff Oracle Java development team, Saint Petersburg, Russia * I would love to change the world, but they won't give me the sources.
