Bonjour, j'ai un petit projet où je charge des dll.
Pour la deuxième, si je met Exception et pas UnsatisfiedLinkError, l'exception n'est pas rattrapée. Pourquoi ? Je croyais que toutes les exceptions en java héritaient de Exception.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 try{ System.load(path+"libgel.dll"); } catch (Exception e){ System.out.println("error loading "+e.getMessage()); e.printStackTrace(); } try{ System.load(path+"libelm.dll"); } catch (UnsatisfiedLinkError e){ System.out.println("error loading "+e.getMessage()); e.printStackTrace(); }
Partager