Salve a tutti, sono un neofita di java e della programmazione in generale, ho un problema forse banale, che non riesco a risolvere, ho cercato in rete non sono riuscito a capire come risolvere.L'errore che mi da è il seguente:[Laad] IO Error: writing aborted; java.io.NotSerializableException: JPESX[Update] IO Error: javax.swing.filechooser.FileNameExtensionFilter[Laad] IO Error: writing aborted; java.io.NotSerializableException: javax.swing.filechooser.FileNameExtensionFilterSon o circa 700 righe di codice, questa è la parte di codice che penso causi l'errore,:
codice:
public class JPESX implements Serializable{            JPESX() {                    fc = new JFileChooser(System.getProperty("user.dir")); 		    fc.setAcceptAllFileFilterUsed(false); 	            fc.addChoosableFileFilter(new FileNameExtensionFilter("Image files", ImageIO.getReaderFileSuffixes()));public class HighscoreManager implements Serializable{    // An arraylist of the type "score" we will use to work with the scores inside the class    private ArrayList scores;    // The name of the file where the highscores will be saved    private static final String HIGHSCORE_FILE = "scores.dat";    //Initialising an in and outputStream for working with the file    ObjectOutputStream outputStream = null;    ObjectInputStream inputStream = null;    public HighscoreManager() {        //initialising the scores-arraylist        scores = new ArrayList();    }    public ArrayList getScores() {        loadScoreFile();        sort();        return scores;    }    private void sort() {        ScoreComparator comparator = new ScoreComparator();        Collections.sort(scores, comparator);}    public void addScore(String name, long score) {        loadScoreFile();        scores.add(new Score(name, score));        updateScoreFile();}    public void loadScoreFile() {        try {            inputStream = new ObjectInputStream(new FileInputStream(HIGHSCORE_FILE));            scores = (ArrayList) inputStream.readObject();        } catch (FileNotFoundException e) {            System.out.println("[Laad] FNF Error: " + e.getMessage());        } catch (IOException e) {            System.out.println("[Laad] IO Error: " + e.getMessage());        } catch (ClassNotFoundException e) {            System.out.println("[Laad] CNF Error: " + e.getMessage());        } finally {            try {                if (outputStream != null) {                    outputStream.flush();                    outputStream.close();                }            } catch (IOException e) {                System.out.println("[Laad] IO Error: " + e.getMessage());            }        }}    public void updateScoreFile() {        try {            outputStream = new ObjectOutputStream(new FileOutputStream(HIGHSCORE_FILE));            outputStream.writeObject(scores);        } catch (FileNotFoundException e) {            System.out.println("[Update] FNF Error: " + e.getMessage() + ",the program will try and make a new file");        } catch (IOException e) {            System.out.println("[Update] IO Error: " + e.getMessage());        } finally {            try {                if (outputStream != null) {                    outputStream.flush();                    outputStream.close();                }            } catch (IOException e) {                System.out.println("[Update] Error: " + e.getMessage());            }        }}}
Ringrazio in anticipo chi riuscirà a darmi una mano.