bonjour tout le monde, j'utilise JbuilderX, et il me génère cette erreur lors de la compilation ,
java.lang.NoClassDefFoundError: pop/POP
Exception in thread "main"
le code que je veux exécuter est le suivant:
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
package pop;
import java.io.*; 
import java.net.*; 
import java.util.*; 
 
 
class pop3 
{ 
private String server, login, pass; 
private int port; 
private Socket socket; 
 
private static InputStreamReader conv = new InputStreamReader(System.in); 
private static BufferedReader in = new BufferedReader(conv); 
 
public pop3 (String serv, int por, String log, String pas) 
{ 
server = serv; 
port = por; 
 
login = log; 
pass = pas; 
} 
 
 
public void receive() 
{ 
 
PrintWriter to; 
BufferedReader from; 
String str; 
 
try { 
 
System.out.println(" Connection"); 
 
socket = new Socket(InetAddress.getByName(server),port); 
 
to = new PrintWriter( 
new BufferedWriter ( 
new OutputStreamWriter ( 
socket.getOutputStream())),true); 
from = new BufferedReader( 
new InputStreamReader ( 
socket.getInputStream())); 
 
str = from.readLine(); 
System.out.println(str); 
 
to.println("user "+login); 
System.out.println("USER - "+from.readLine()); 
 
to.println("pass "+pass); 
if (str.startsWith("-ERR")) { System.out.println("Erreur login/mdp"); System.exit(1); } 
System.out.println("PASS - "+from.readLine()); 
 
to.println("list"); 
str = from.readLine(); 
System.out.println("LIST - "+str); 
 
StringTokenizer nb_msg = new StringTokenizer(str); nb_msg.nextToken(); 
 
int tmp = Integer.parseInt(nb_msg.nextToken()); 
int it = tmp; 
while (it!=0) { System.out.println(from.readLine()); it--; } 
str = from.readLine(); 
System.out.println("// LIST - \"+str+\" "+tmp); 
 
String cont = ""; 
while (tmp!=0 && !cont.equals("q")) { 
System.out.println(cont); 
if (cont.equals("list")) { 
to.println("list"); 
it = tmp+1; 
while (it!=0) { System.out.println(from.readLine()); it--; } 
str = from.readLine(); 
} 
 
System.out.print("Lire mail numero: "); 
cont = in.readLine(); 
System.out.println("\\n--------------------- Debut du mail --------------------"); 
to.println("RETR "+Integer.parseInt(cont)); 
 
boolean tp=false; 
while (!tp) { 
str = from.readLine(); 
if (str!=null && !str.equals(".")) { 
System.out.println(str); 
} 
else tp=true; 
} 
 
System.out.println("---------------------- Fin du mail ---------------------\\n\\nVoulez vous lire un autre mail? (\\\"q\\\" pour quitter, \\\"list\\\" pour voir les mails.)"); 
cont = in.readLine(); 
} 
 
 
to.println("quit"); 
str = from.readLine(); 
System.out.println("QUIT - "+str); 
 
socket.close(); 
 
} catch ( Exception e ) { 
System.err.println("Erreur de connexion : "+e.toString()); 
System.exit(1); 
} 
 
} 
 
 
public static void main (String args[]) 
{ 
 
String s="",e="",l="",p=""; 
try 
{ 
 
System.out.print("Serveur pop: "); 
s = in.readLine(); 
 
System.out.print("Login: "); 
l = in.readLine(); 
 
System.out.print("Pass: "); 
p = in.readLine(); 
 
 
} 
catch (IOException f) {} 
 
pop3 c = new pop3(s,110,l,p); c.receive(); 
 
} 
 
}
merci