Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!news-1.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Nigel Wade Newsgroups: comp.lang.java.programmer Subject: Re: Executable JAR files and writing to a text file. Date: Fri, 13 Feb 2015 10:01:48 +0000 Lines: 10 Message-ID: References: <5efb672e-7a66-4db0-af62-42fc48cd59f6@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net E8/uFXAiZevwRygG/OvSMQl/r/15hmgWLCzWSrPqbv2Sj69C3p Cancel-Lock: sha1:E5HKLPRAdf0NJpexwfPqkjBvQdo= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 In-Reply-To: <5efb672e-7a66-4db0-af62-42fc48cd59f6@googlegroups.com> Xref: csiph.com comp.lang.java.programmer:31129 On 12/02/15 17:40, Doug Mika wrote: > I have an application in which it writes to a text file at a specific directory location. I run the program and it runs fine! Now I create an executable JAR file. Should the jar file work fine if the program needs to write to a text file in ../resources/HighScore.txt? > Yes, provided the /relative/ location you are using (it is not a specific location) actually corresponds to the file you want to access. In addition to what Jeff has suggested, you could look at the Java Preferences class. It may provide an alternative solution.