java - Adding nested jars into the classpath -


the java documentation includes note adding nested jars classpath.

to load classes in jar files within jar file class path, must write custom code load classes.

there many tools this, such ones listed here , here.

  1. do these tools work extracting classes nested jars , adding extraction path classpath? or take more unzipping archives?
  2. is there technical reason limitation manifest.mf classpath can point local file system, not inside own archive?

another option if using maven shade mojo. explode of jars, allowing contents packaged code. capable of other magic, moving dependencies custom packages avoid conflicts , merging files found in meta-inf.

one of primary problems jars expose artifacts @ same location. can problematic (usually jdk) systems allow extension via serviceloader. these files need intelligently merged / concatenated.

another api effected in subtle, possible bug causing ways, classloader.getresources(string).

if using secrutiymanager things can more complicated security domains.

tl;dr it's limitation largely driven classloading api


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -