Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Knute Johnson Newsgroups: comp.lang.java.programmer Subject: Re: Convention for location of jar files Date: Sat, 07 Feb 2015 09:57:35 -0800 Organization: A noiseless patient Spider Lines: 32 Message-ID: References: <0d521fb0-7bef-45f3-8f43-a084e75f0e8c@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sat, 7 Feb 2015 17:57:01 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="aba33539224e5c782fe0c4053f7756fd"; logging-data="2347"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18cNIBrL5me2CSZPBkVbYMR" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 In-Reply-To: <0d521fb0-7bef-45f3-8f43-a084e75f0e8c@googlegroups.com> Cancel-Lock: sha1:IN5QE7QPSpykrnXAn4PYA/csN+8= Xref: csiph.com comp.lang.java.programmer:31071 On 02/07/2015 07:09 AM, Noman Shapiro wrote: > Is there a convention, or perhaps conventions, for the location of jar files, > for use by scripts with commands like "java -jar someDirectory/foobar.jar" ? > There is a package convention. com.yournameoruniqueidentifier.packagename... So that would be your directory hierarchy too. I keep them under my home directory on both Windows and Linux. So on Windows my directory structure is: C:\Users\Knute Johnson\com\knutejohnson\customer\packagename\... on Linux /home/knute/com/knutejohnson/customer/packagename/... When I deliver a program to a customer, I can use this same directory structure or a simpler one where just the end package directory is created in the customer's home directory. I store all data files in the same place too. When you create your program and the manifest file for your program jar file you can use relative paths to define the location of any library jar files. I hope that is the question you wanted answered. -- Knute Johnson