>>> You might wanna create a temporary jar file if possible, just in case the >>> test somehow fails to clean things up. >> >> Unsure how to do that, or perhaps I don’t understand your request. > > I believe it’s possible to create a temporary directory, see > Files.createTempDirectory, and use that to place the test.jar, although it > might be more awkward to clean up. > > Actually maybe it’s ok with regards to test execution if you can confirm the > “user.dir” is set up correctly with jtreg, i cannot recall.
It’s usually JTwork/scratch. A lot of tests use user.dir.