Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #31128
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.swapon.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Jeff Higgins <jeff@invalid.invalid> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Executable JAR files and writing to a text file. |
| Date | Thu, 12 Feb 2015 19:22:34 -0500 |
| Organization | A noiseless patient Spider |
| Lines | 19 |
| Message-ID | <mbjgbg$omf$1@dont-email.me> (permalink) |
| References | <5efb672e-7a66-4db0-af62-42fc48cd59f6@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=windows-1252; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Fri, 13 Feb 2015 00:26:24 +0000 (UTC) |
| Injection-Info | mx02.eternal-september.org; posting-host="c50a9e5d554cfaba13eda1c71e805135"; logging-data="25295"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19qGNb/ht+AcqsH1OBFH2rfTAqsxN+5bMs=" |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.4.0 |
| In-Reply-To | <5efb672e-7a66-4db0-af62-42fc48cd59f6@googlegroups.com> |
| Cancel-Lock | sha1:9km/290ig6Z/8z+/FODOEfGmkCw= |
| Xref | csiph.com comp.lang.java.programmer:31128 |
Show key headers only | View raw
On 02/12/2015 12:40 PM, 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? It seems to me that you are hoping to access a text file that is external to your jar, and that this external text file is located in a directory relative to your jar. If this is correct, then there seems to be some gotchas involved and I'm not familiar enough with the api to offer concrete advice. But there is some discussion on stackoverflow that might help. <http://stackoverflow.com/questions/8775303/read-properties-file-outside-jar-file> Is one such discussion. Probably more, you might try searching there.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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