Magnolia 5.3 reached end of life on June 30, 2017. This branch is no longer supported, see End-of-life policy.

Page tree
Skip to end of metadata
Go to start of metadata

Classpath is a parameter that tells the Java Virtual Machine or the Java compiler where to look for user-defined classes and packages. The classpath of a Magnolia webapp includes any JAR files in /WEB-INF/lib and any classes and resources in /WEB-INF/classes.


  1. I would really like to have this includable corrected if it's wrong. The classpath a key concept that even non-Java users should know.

  2. Antti Hietala

    I agree. But this "concept" contains several "points" ... and not all of them fit where you've included it yet.

    • the classpath is a list of JAR files or directories which may contain jar files which is given to a VM as parameter ... to let the VM (actually: the classloader of the VM) know where it might look up for classes.
    • In a servlet container as tomcat, there are many different classloaders working ... not all of them having the same "classpath" ... some of the classloaders know all jars ... some of them know only the jars in /server ... some of them know only the jars in /WEB-INF-lib ...
    • In the resources context ... "classpath origin" means: the resource loader looks into JAR files - which are given for a vertain context - here the context is the webapp - searching for resources ... actually looking into all JAR files which 

    ... so ... hard to put this all into one includable to be used everywhere for "classpath" ...