If you use the following in your jtreg test:
* @library /../../test/lib
* @build sun.hotspot.WhiteBox
The following files are produced in the current directory:
test/lib/sun/hotspot/WhiteBox$WhiteBoxPermission.class
test/lib/sun/hotspot/WhiteBox.class
They should be in the JTwork directory. This problem was produced with hotspot/test/runtime/SharedArchiveFile/SharedStrings.java, and other tests.
* @library /../../test/lib
* @build sun.hotspot.WhiteBox
The following files are produced in the current directory:
test/lib/sun/hotspot/WhiteBox$WhiteBoxPermission.class
test/lib/sun/hotspot/WhiteBox.class
They should be in the JTwork directory. This problem was produced with hotspot/test/runtime/SharedArchiveFile/SharedStrings.java, and other tests.
- duplicates
- 
                    CODETOOLS-7901585 disallow library references outside the test suite -           
- Closed
 
-         
- relates to
- 
                    JDK-8140189 [TESTBUG] Get rid of "@library /../../test/lib" in jtreg tests -           
- Resolved
 
-         
- 
                    CODETOOLS-7901359 Use of /../../test/lib on @library results in test/lib being created in current directory -           
- Closed
 
-         
- 
                    JDK-8148000 test class files are being overwritten -           
- Closed
 
-