I wonder if it's possible with some tooling or code to retrieve the classpath used by the application server? for example the JAR files loaded ?
Not directly or simply. you can look at jmx mbeans and look for ModuleLoader which has references to what jars are loaded for each module.
Retrieving data ...