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.

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 2015-02-13 10:01 +0000
Message-ID <ck60cdF2blfU1@mid.individual.net> (permalink)
References <5efb672e-7a66-4db0-af62-42fc48cd59f6@googlegroups.com>

Show all headers | 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