Write to disk in Platform based JUnit tests

"mhaslinger" <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.openide.devel
Message-ID <[email protected]>
Already some weeks back we found the solution to our Problem:

The Netbeans user Directory has to be set an then any Location (temp dir or specific path) can be used:


Code:

public void setUp() throws IOException {
    Path userDir = Files.createTempDirectory("userConfigTemp");
    System.setProperty("netbeans.user", userDir.toString());
}



Do not Forget to cleanup the temp dir afterwards.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.