Bonjour,
J'ai un prob avec mon jar il ne trouve pas le fichier AmsterdamErreur.txt alors que lorsque je le lance avec eclipse ya pas de probleme....
Help je craque un peu la
AmsterdamErreur.txt
Et le code d'ouvertur est :
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 10; Syntax error on field : 11; The character is not allowed : 20; Error on field : 21; This field is mandatory. It must not be empty or contain only blank characters. 2001; Syntax error on field 20 (Sender's Reference).This field must contain 1 to 16 alphanumeric characters. 2002; Syntax error on field 20 (Sender's Reference).This field must not start or end with a slash '/' and must not contain two consecutive slashes '//'. 2101; Syntax error on field 21E (Registration Reference)This field must contain 1 to 8 numeric characters. 3001; Syntax error on field 30 (Requested Execution Date)This field must contain a valid date. 5001; Syntax error on field 50D (Creditor's Name)This field must contain 1 to 35 alphanumeric characters. 5002; Syntax error on field 50D (Creditor's address - 1st line)This field must contain 1 to 35 alphanumeric characters. 5003; Syntax error on field 50D (Creditor's address - 2nd line)This field must contain 1 to 35 alphanumeric characters. 5004; Syntax error on field 50D (Creditor's address - 3rd line)This field must contain 1 to 35 alphanumeric characters. 7701; Syntax error on field 77B (Residence of Creditor)This field must contain 2 alphabetic characters. 7702; Syntax error on field 77B (Creditor's Reference)This field must contain 1 to 16 numeric characters. 2111; Syntax error on field 21 (Trasaction Reference)This field must contain 1 to 16 alphanumeric characters. 2112; Syntax error on field 21 (Trasaction Reference)This field must not start or end with a slash '/' and must not contain two consecutive slashes '//'. 3201; Syntax error on field 32B (Transaction Amount)This field must contain a valid amount. 5901; Syntax error on field 59 (Debtor's Account)This field must contain 10 numeric characters. 5902; Syntax error on field 59 (Debtor's Name)This field must contain 1 to 35 alphanumeric characters 5903; Syntax error on field 59 (Debtor's address - 1st line)This field must contain 1 to 35 alphanumeric characters 5904; Syntax error on field 59 (Debtor's address - 2nd line)This field must contain 1 to 35 alphanumeric characters 5905; Syntax error on field 59 (Debtor's address - 3rd line)This field must contain 1 to 35 alphanumeric characters 7001; Syntax error on field 70 (Remittance Information - 1st line)This field must contain 1 to 15 alphanumeric characters 7002; Syntax error on field 70 (Remittance Information - 2nd line)This field must contain 1 to 15 alphanumeric characters 7703; Syntax error on field 70 (Creditor's Abonnement Code)This field must contain 8 alphanumeric characters. 5301; Syntax error on field 53B (Debtor's account)This field must contain 10 numeric characters.
Ce qui me perturbe c'est que la recherche de l'icone qui est dans le meme repertoir que le fichier erreurImage image = Toolkit.getDefaultToolkit().createImage(
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 Image image = Toolkit.getDefaultToolkit().createImage( this.getClass().getResource("/images/sg_title.jpg")); //Initialisation variable tableau erreurs try { URL url = this.getClass().getResource("/images/AmsterdamErrors.txt"); String path = url.getPath(); path = path.replaceAll("%20", " "); System.out.println(path); path = path.substring(1); System.out.println(path); InputStream ips1 = new FileInputStream(path); // InputStream ips1 = new FileInputStream("AmsterdamErrors.txt"); InputStreamReader ipsr1 = new InputStreamReader(ips1); BufferedReader br1 = new BufferedReader(ipsr1); String ligneCommande; while ((ligneCommande = br1.readLine()) != null) { String[] norme = ligneCommande.split(";"); errorMap.put(Integer.parseInt(norme[0]), norme[1]); } br1.close(); } catch (IOException e) { System.out.println(e.toString()); }
this.getClass().getResource("/images/sg_title.jpg")); s'effectue bien avec le jar, mais pour autant il ne trouve pas le fichier txt voisin
Explication????
Je vous en pris
Partager