Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Cecil Westerhof Newsgroups: comp.lang.java.programmer Subject: Re: Where does jshell save things Date: Tue, 30 Jul 2019 07:28:31 +0200 Organization: Decebal Computing Lines: 26 Message-ID: <87d0hsnla8.fsf@munus.decebal.nl> References: <87lfwgoeez.fsf@munus.decebal.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: reader02.eternal-september.org; posting-host="836bcd58d7669a6d0685c847623fc8c3"; logging-data="28258"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19QXbmo2fCU3VMS+Uq3C1PTLwrlK5pLC7k=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Cancel-Lock: sha1:05Mv+w7sQBcMzaqF/h2HWfgAIAM= sha1:CgG+4Mx1IqLnawrN9QWnry6TLrQ= Xref: csiph.com comp.lang.java.programmer:39023 Arne Vajhøj writes: > On 7/29/2019 2:59 PM, Cecil Westerhof wrote: >> When I start jshell it remembers the history from previous runs. Where >> is this saved? > > I believe it uses preferences API. > > So it is OS specific. > > Windows => registry > > *nix => $HOME/.java dir I already thought about that, but in ~/.java I saw only a fonts directory. Looking better there is also an .userPrefs directory. (First time I see a hidden directory in a hidden directory.) The file I need is: ~/.java/.userPrefs/tool/JShell/prefs.xml I do not like that it is XML, but it is what it is. -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof