Re: RFR(S): JDK-8165500: TestJpsJar shouldn't jar all test.classpath directories

2016-09-20 Thread Dmitry Samersoff
Dmitry, After some debugging: 1. We have to explicitly @build JpsBase to put it into jar file. 2. Couple of testlibrary classes are build because of JpsBase.java dependency. Jtreg put it to ./JTwork/classes/sun/tools/jps/jdk/testlibrary/ i.e. we have incomplete jdk.testlibrary package. 3. If

Re: RFR(S): JDK-8165500: TestJpsJar shouldn't jar all test.classpath directories

2016-09-16 Thread Dmitry Dmitriev
Dmitry, here is how I see this situation: When we ran sun/tools/jps/TestJpsJar.java alone in the clean folder, it builds testlibrary classes implicitly and put it under the same folder with test class, i.e. to JTwork/classes/sun/tools/jps folder and test works fine. But sun/tools/jinfo/BasicJInf

Re: RFR(S): JDK-8165500: TestJpsJar shouldn't jar all test.classpath directories

2016-09-15 Thread Dmitry Samersoff
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 JpsHelpe

Re: RFR(S): JDK-8165500: TestJpsJar shouldn't jar all test.classpath directories

2016-09-15 Thread Daniel Fuchs
Hi Dmitry, I wonder whether failures can be caused by adding the classes in the wrong order... If you have -cp a:b:c - the class loader will look at a first, then b, then c. But if you create a jar and adds a first, b second, and c last, then it's equivalent to -cp c:b:a Could there be an issu

Re: RFR(S): JDK-8165500: TestJpsJar shouldn't jar all test.classpath directories

2016-09-15 Thread Dmitry Dmitriev
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/

RFR(S): JDK-8165500: TestJpsJar shouldn't jar all test.classpath directories

2016-09-15 Thread Dmitry Samersoff
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