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


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

Re: Convention for location of jar files

From Knute Johnson <eternal@knutejohnson.com>
Newsgroups comp.lang.java.programmer
Subject Re: Convention for location of jar files
Date 2015-02-07 09:57 -0800
Organization A noiseless patient Spider
Message-ID <mb5jld$29b$1@dont-email.me> (permalink)
References <0d521fb0-7bef-45f3-8f43-a084e75f0e8c@googlegroups.com>

Show all headers | View raw


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

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


Thread

Convention  for location of jar files Noman Shapiro <normanzshapiro@gmail.com> - 2015-02-07 07:09 -0800
  Re: Convention  for location of jar files Knute Johnson <eternal@knutejohnson.com> - 2015-02-07 09:57 -0800
    Re: Convention  for location of jar files Arne Vajhøj <arne@vajhoej.dk> - 2015-02-07 15:44 -0500
  Re: Convention  for location of jar files Jeff Higgins <jeff@invalid.invalid> - 2015-02-07 14:52 -0500
    Re: Convention  for location of jar files Fredrik Jonson <fredrik@jonson.org> - 2015-02-08 08:56 +0000
    Re: Convention  for location of jar files Martin Gregorie <martin@address-in-sig.invalid> - 2015-02-08 11:40 +0000
      Re: Convention  for location of jar files Arne Vajhøj <arne@vajhoej.dk> - 2015-02-08 10:54 -0500
        Re: Convention  for location of jar files Martin Gregorie <martin@address-in-sig.invalid> - 2015-02-08 22:17 +0000

csiph-web