I\'m trying to configure the Java Logging API\'s FileHandler to log my server to a file within a folder in my home directory, but I don\'t want to have to create those direc
I generally try to avoid static code but to work around this limitaton here is my approach that worked on my project just now.
I subclassed java.util.logging.FileHandler and implemented all constructors with their super calls. I put a static block of code in the class that creates the folders for my app in the user.home folder if they don't exist.
In my logging properties file I replaced java.util.logging.FileHandler with my new class.