3

The question is in the title I guess. Both folders have a bin directory with some duplication of scripts, etc. Then there are multiple lib directories as well. One in the /glassfish/lib and another in /glassfish/domains//lib. It just seems odd to me and gets confusing as to where I should put classpath jars, direct env variables to, etc. Is there any specific reason for this?

Thanks

Alan Smith
  • 1,069
  • 4
  • 19
  • 23

1 Answers1

3

The reason for this is that it gives you the flexibility to provide libs at different visibility levels.

The folder glassfish/lib contains the libs which should be available for the whole server and all domains.

The folder glassfish/domains/domain1/lib contains only the libs which are available for domain1.

If you had a domain2, the folder glassfish/domains/domain2/lib would contain the libs which are required for domain2.

Now, as an example, if you have some libs which are required by domain1 and domain2, you can put them in the folder glassfish/lib, so they are available for the whole server and therefore for both domains.

Another example, if you have two domains, and both domains require a different version of the same lib, you have to put the specific versions into glassfish/domains/domain1/lib and glassfish/domains/domain2/lib accordingly.

As a consequence of this, you can always put your libs into glassfish/lib if you only have a single domain.

See also:

Community
  • 1
  • 1
unwichtich
  • 13,712
  • 4
  • 53
  • 66