Erreur NullPointerException incompréhensible
Bonjour,
Code:
1 2 3 4 5 6 7
| File entryFile = new File("C:\\www.xml");
cl1 essai = new cl1();
String logPass ="";
String userCherch = "ladjm";
logPass = essai.recherche(userCherch, entryFile);
logPass = "lulu";
textLog.setText("Identifiant : "+logPass); |
Voici mon code, la fonction recherche ne fonctionne pas et ne renvoi rien.
Dans ce code le JTextField affiche bien "Identifiant : lulu". Pourtant quand je commente
Code:
//logPass = essai.recherche(userCherch, entryFile);
(la ligne qui ne fonctionne pas) le compilateur me dit :
Citation:
Exception in thread "main" java.lang.NullPointerException
at essai.main(essai.java:39)
Si quelqu'un a une idée de la provenance de mon problème...
Merci