How to write to files outside a jar?

alexmac05 used Ask the Experts™
I need to write to a file outside of a jar. I have an executable jar file with a main and i am using FileWriter.

i can see from this posting that it is possible:

however, the posting doesn't explain how to do it. How do you do this?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Java Developer
Top Expert 2010
FileWriter writer = new FileWriter(new File("/path/to/file.txt"));

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial