I'm running a 3rd party library, and part of its operation is to download a zip file to a temp directory, unzip it and then move it from the temp directory to a final directory... for some reason, this fails when I leave system properties to the default:
java.nio.file.DirectoryNotEmptyException: /var/folders/j_/1v53z7q15v51wyb00jzht_ch0000gn/T/vertx-68e24a9e-ee15-4b49-a796-7176714865ec
at sun.nio.fs.UnixCopyFile.move(UnixCopyFile.java:491)
at sun.nio.fs.UnixFileSystemProvider.move(UnixFileSystemProvider.java:261)
at java.nio.file.Files.move(Files.java:1345)
...
However if I set java.io.tmpdir to .tmp (and create a .tmp directory in my working dir), it works!
This also does not work if I use sudo.
This is really pissing me off... what do I need to do to get this working on OS X?
> java -version
java version "1.7.0_17"
Java(TM) SE Runtime Environment (build 1.7.0_17-b02)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
> uname -a
Darwin daryl-teos-macbook-pro.fritz.box 12.2.0 Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64 x86_64
Regards, Daryl