permission denied error while reading/writing file by application(.jar) in mac

The problem is in Mac OS.

No, the problem is not having permission to write to the Library directory of userxyz. Java WebStart is usually more than sufficient, but you should at least follow the approach recommended in Technical Q&A QA1170: Important Java Directories on Mac OS X. Note the distinction between user preferences, user data and application support, each of which is rooted in System.getProperty("user.home"). Note also that, java.util.Preferences uses ~/Library/Preferences/your.qualified.name by default. In addition, there's no reason to use hidden file names.