Continuo ad avere problemi sui file, e non capisco il motivo... Tutit gli errori sono dovuti al fatto che il Java non riesce a trovare i file che li dico di aprire (nè con il percorso assoluto nè con il nome del file e basta)... Non so più cosa fare...
Severity Description Resource In Folder Location Creation Timecodice:public class EsFile extends JFrame { File file1, file2, file3; RecordFile recordMast, writeMast; Record2File recordTrans; public EsFile() { super("Dialogs"); setSize(300,300); setVisible(true); FileInputStream oldMaster, Transaction; FileOutputStream newMaster; ObjectInputStream inOldMaster, inTransaction; ObjectOutputStream outNewMaster; file1 = new File("D:/Programmazione/java/EsFile/oldmast.dat"); System.out.println(file1.exists()); try { oldMaster = new FileInputStream(file1); } catch (FileNotFoundException fileNotFoundException) { JOptionPane.showMessageDialog(this,"error", "errore read file", JOptionPane.ERROR_MESSAGE); } catch (IOException ioException) { JOptionPane.showMessageDialog(this,"error", "errore read file", JOptionPane.ERROR_MESSAGE); } inOldMaster = new ObjectInputStream(oldMaster); recordMast = new RecordFile(); try { while ( true ) { recordMast = (RecordFile) inOldMaster.readObject(); } } catch (FileNotFoundException fileNotFoundException) { JOptionPane.showMessageDialog(this,"error", "errore read file", JOptionPane.ERROR_MESSAGE); } catch (EOFException endofException) { inOldMaster.close(); } catch ( ClassNotFoundException classNotFoundException) { JOptionPane.showMessageDialog(this,"unable", "classss", JOptionPane.ERROR_MESSAGE); } catcht(IOException ioException) { JOptionPane.showMessageDialog(this,"error", "errore read file", JOptionPane.ERROR_MESSAGE); } } }
1 Unreachable catch block for IOException. Only more specific exceptions are thrown and handled by previous catch block(s). EsFile.java EsFile line 35 24 ottobre 2005 6.33.58
2 Unhandled exception type IOException EsFile.java EsFile line 39 24 ottobre 2005 6.33.58
2 Unhandled exception type IOException EsFile.java EsFile line 52 24 ottobre 2005 6.33.58
1 The serializable class EsFile does not declare a static final serialVersionUID field of type long EsFile.java EsFile line 5 24 ottobre 2005 6.33.58
2 The local variable oldMaster may not have been initialized EsFile.java EsFile line 39 24 ottobre 2005 6.33.58
1 The serializable class Record2File does not declare a static final serialVersionUID field of type long Record2File.java EsFile line 4 24 ottobre 2005 6.21.16
1 The serializable class RecordFile does not declare a static final serialVersionUID field of type long RecordFile.java EsFile line 4 24 ottobre 2005 6.21.16

Rispondi quotando