test.class.path.prefix?

Jonathan Gibbons jonathan.gibbons at oracle.com
Fri May 15 17:13:55 UTC 2015


On 05/14/2015 07:56 PM, Weijun Wang wrote:
> I have a test A.java (in test/x) that uses B.java in @library test/y, 
> and the test is trying to spawn another Java process running itself 
> again (with a different arg). It also happens that inside test/x there 
> is a META-INF directory with services file I want to use.
>
> So, the child Java process should be able to see both A and B and 
> META-INF in its classpath.
>
> I notice that both A and B are compiled into WORKDIR/classes/x.

This is not expected.  Do you have a line @build B?

>
> So, how do I specify the -cp for the child process? I found this 
> system property which is perfect:
>
> - test.class.path.prefix: WORKDIR/classes/x and test/x
>
> However the name is quite strange, and it's not described at the end 
> of tag-spec.html. There are other system properties specified but none 
> is enough, although I can combine test.classes and test.src to get 
> what I need.
>
> Can test.class.path.prefix be supported?

Does test.class.path not work for you?

>
> Thanks
> Max



More information about the jtreg-dev mailing list