Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #31129

Re: Executable JAR files and writing to a text file.

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 <nmw@ion.le.ac.uk>
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 <ck60cdF2blfU1@mid.individual.net> (permalink)
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

Show key headers only | View raw


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.

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Executable JAR files and writing to a text file. Doug Mika <dougmmika@gmail.com> - 2015-02-12 09:40 -0800
  Re: Executable JAR files and writing to a text file. Jeff Higgins <jeff@invalid.invalid> - 2015-02-12 19:22 -0500
  Re: Executable JAR files and writing to a text file. Nigel Wade <nmw@ion.le.ac.uk> - 2015-02-13 10:01 +0000
  Re: Executable JAR files and writing to a text file. Arne Vajhøj <arne@vajhoej.dk> - 2015-02-14 22:31 -0500

csiph-web