[J2ME] Verifier Error

0

Witam. Szybkie pytanie:
Mam eclipse, tworze sobie projekt J2ME.

Mam tam dwa pliki, ponieważ nie ma serializacji, to sam ją implementuje i tak:

plik1:

	/** 
	 * @see pl.bgora.utils.Persistent#read(java.io.DataInputStream)
	 */
	public void read(DataInputStream in) throws IOException {
		this.phone_id = new Integer(in.readInt());
		this.server_id = new Integer(in.readInt());
		this.note = in.readUTF();
		this.person_id = new Integer(in.readInt());
		this.person_server_id = new Integer(in.readInt());
	}
	/** 
	 * @see pl.bgora.utils.Persistent#write(java.io.DataOutputStream)
	 */
	public void write(DataOutputStream out) throws IOException {
		out.writeInt(this.phone_id!=null?this.phone_id.intValue():Constants.NO_VALUE);
		out.write(this.server_id!=null?this.server_id.intValue():Constants.NO_VALUE);
		out.writeUTF(this.note);
		out.writeInt(this.person_id!=null?this.person_id.intValue():Constants.NO_VALUE);
		out.write(this.person_server_id!=null?this.person_server_id.intValue():Constants.NO_VALUE);
		
	}

plik2:

	/** 
	 * @see pl.bgora.utils.Persistent#read(java.io.DataInputStream)
	 */
	public void read(DataInputStream in) throws IOException {
		this.person_id = new Integer(in.readInt());
		this.server_id = new Integer(in.readInt());
		this.name = in.readUTF();
		this.surname = in.readUTF();
		this.status = in.read();
	}

	/** 
	 * @see pl.bgora.utils.Persistent#write(java.io.DataOutputStream)
	 */
	public void write(DataOutputStream out) throws IOException {
		out.writeInt(this.person_id!=null?this.person_id.intValue():Constants.NO_VALUE);
		out.write(this.server_id!=null?this.server_id.intValue():Constants.NO_VALUE);
		out.writeUTF(this.name);
		out.writeUTF(this.surname);
		out.writeInt(this.status);
		
	}

W pliku 2 pluje mi czymś takim:

Severity and Description Path Resource Location Creation Time Id
Error preverifying class pl.bgora.model.Person
VERIFIER ERROR pl/bgora/model/Person.read(Ljava/io/DataInputStream;)V:
Cannot find class java/io/FilterInputStream DatabaseMidlet/src/pl/bgora/model Person.java Unknown 1241470105906 1191

Dlaczego? I dlaczego nie pluje mi w pliku 1?
Ścieżki są ok. Sprawdzałem 10 razy.
Czy problemem może być to, że midp = jdk 1.3 a ja mam 1.6 ?

Pozdro.

0

Ok. Rada dla potomnych:

Eclipse przy zakładaniu projektu dodaje do classpath jre1.6 i wtk 2.5.
Obie biblioteki zawierają klase DataInputStream, niestety w jre klasa ta dziedziczy po FormatInputStream, którego z kolei nie ma w wtk, co powoduje, że eclipse czasem "widzi" klasę z WTK, a czasem a JRE.

Rozwiązanie: Usunąć z projektu JRE.

Pozdrawiam.

1 użytkowników online, w tym zalogowanych: 0, gości: 1