Search code examples
javawindowstemporary-files.class-file

Looking for a place to store temporary .class files on Windows (some similar app support on Mac)


Possible Duplicate:
Storing a file in the user’s directory in cross-platform Java

I am working on a java project and the java application ends up making some .class files. Currently, these files are stored inside a projects directory inside the main application directory. Some people who run the application on a network with a certain version of Novel security software experience issues sometimes when these .class files are created or modified. I would like to instead always store these files locally but I am unsure of where to store them on the PC version. On the Mac I think I will store them in application support but I do not know of a similar place on the PC. Also, it would be best if there was a location that would be good for XP Vista and 7 but if I had to have specific locations for each OS that would be sufficient as well.


Solution

  • Use the %AppData% environment variable? I suppose you'd just need to add it to CLASSPATH...