Voici les 3 projets Eclipse :
ExchangeBridge {
src
}
Librairie {
lib
-ExchangeBridge.jar
-Module1.jar
-Module2.jar
}
ProjectPrincipale {
src :
Web-INf/lib
}
Dans le projet librairie on je positionne tous les jar des differents module y compris ExchangeBridge.
Dans projet principale j'ajoute un lien vers ExchangeBridge.jar
<classpathentry kind="lib" path="/Librairie/lib/ExchangeBridge.jar"/>
A la compilation nikel
Par contre à l'execution, les instructions utilisant une classe utilisant ExchangeBridge font n'importe quoi
Exemple :
1 2 3 4 5 6 7 8 9 10 11 12
|
try {
System.out.println("avant");
ClasseUtilisantLib.methode();
System.out.println("apres");
}
catch(Exception e) {
System.out.println("exception");
}
finally {
System.out.println("finally");
} |
Et j'obtient au debugage comme à la console, sans passé par l'exception.
-> avant
-> finally
Par contre si je copie la librairie dans web-inf lib du projet et l'ajoute au classpath ca marche.
Partager