File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Serialization compiler error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Serialization compiler error" Watch "Serialization compiler error" New topic

Serialization compiler error

Nicholas Carrier
Ranch Hand

Joined: Apr 14, 2005
Posts: 78
Ok this is an inner class in my BeatBox class.

public class MyLoadListener implements ActionListener {
public void actionPerformed(ActionEvent a) {

JFileChooser fileOpen = new JFileChooser();
File myFile = fileOpen.getSelectedFile();

try {

FileInputStream fileReader = new FileInputStream(myFile);
ObjectInputStream os = new ObjectInputStream(fileReader);
checkboxState = (boolean[]) is.readObject();

} catch(Exception ex) {



for (int i = 0; i < 256; i++) {
JCheckBox check = (JCheckBox) checkBoxList.get(i);
if(checkboxState[i]) {
} else {

} // end of for loop


} // end of method

} // end of inner class

Now when I try to compile this, I get this error message complaining about my is variable, see below. Now I know I must just be missing something stupid so, if anyone can help that'd be great. cannot find symbol
symbol : variable is
location: class BeatBox.MyLoadListener
checkboxState = (boolean[]) is. readObject();

the ^ is supposed to be under is, but I can't seem to get it to stick there
[ June 07, 2005: Message edited by: Nicholas Carrier ]

Teaching yourself anything is always the cheapest way, but it definitely takes a lot of time and effort.<br /> <br />Thank you javaranch <a href="http://""" target="_blank" rel="nofollow">Learn How to Ask Your Question</a> and be nice
Kristin Stromberg
Ranch Hand

Joined: May 17, 2005
Posts: 91
It doesn't look like you've declared the variable "is".
Nicholas Carrier
Ranch Hand

Joined: Apr 14, 2005
Posts: 78
This is why god invented other people. Just so they can look at something so painfully obvious that it hurts. Thank you very much, I've staring at that for roughly 2 hours.
Timmy Marks
Ranch Hand

Joined: Dec 01, 2003
Posts: 226
and the compiler message

cannot find symbol
symbol : variable is

didn't give you a clue? Basically, that's exactly what Kristin said.
I agree. Here's the link:
subject: Serialization compiler error
It's not a secret anymore!