bonjour, j'ai créer un petit projet en java "a titre d'exercice" du fait que je suis apprentit du plus petit échelon et donc lorsque je compile mon projet sous netbeans (F5) il me met une erreur malgré l'éxécution de mon code ...
je vous met mon code a titre indicatif ...ERROR: JDWP Unable to get JNI 1.2 environment, jvm->GetEnv() return code = -2
JDWP exit error AGENT_ERROR_NO_JNI_ENV(183): [../../../src/share/back/util.c:820]
voila j'espère que l'on trouvera une solution mais un truc que je suis sûr c'est que ce n'est pas du au langage. merci d'avance !
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84 /* COMPILATEUR : NetBeans 5.5.1 * VERSION : Java 5 /*class principale*/ package animaux; import java.util.*; /* @author Manu */ public class Main { /** Creates a new instance of Main */ public Main() { } /* @param args the command line arguments */ public static void main(String[] args) { ArrayList <animaux> zoo = new ArrayList <animaux> (); chat cha1 = new chat ("kiara"); chat cha2 = new chat ("kenzo"); chat cha3 = new chat ("cesar"); chien chi1 = new chien ("medor"); chien chi2 = new chien ("tara"); chien chi3 = new chien ("loucky"); zoo.add(cha1); zoo.add(cha2); zoo.add(cha3); zoo.add(chi1); zoo.add(chi2); zoo.add(chi3); for(animaux a : zoo){ a.parler(); } chi2.deplacer(); System.out.println(chi2.getNom); } } /*class animaux*/ package animaux; /* @author Manu */ public class animaux { private String Nom; public animaux() { } public animaux(String Nom){ this.Nom=Nom; } public void parler(){ } public void deplacer(){ System.out.println("Je me déplace ..."); } protected void setNom(){ this.Nom=Nom; } protected String getNom(){ return this.Nom; } } /*class chien*/ package animaux; /* @author Manu */ public class chien extends animaux{ String getNom; /** Creates a new instance of chien */ public chien() { } public chien(String Nom){ super(Nom); } public void parler(){ System.out.println("Wouaf ..."); } } /*class chat*/ package animaux; /* @author Manu */ public class chat extends animaux { /** Creates a new instance of chat */ public chat() { } public chat(String Nom) { super(Nom); } public void parler(){ System.out.println("Miaou ..."); } }
Partager