Questions tagged «notserializableexception»

3
为什么writeObject会抛出java.io.NotSerializableException,我该如何解决?
我有这个异常,我不明白为什么会抛出该异常,或者应该如何处理。 try { os.writeObject(element); } catch (IOException e) { e.printStackTrace(); } 哪里element是一个TransformGroup包含一些其他TransformGroups类的Atom的一个实例: public class Atom extends Group implements Serializable{ float pozX,pozY; Group group= new Group(); Color3f blue = new Color3f(new Color(255)); Color3f black = new Color3f(new Color(0)); Sphere AtSph=new Sphere(); public Atom(final float WEIGHT, final int BOUNDS,final float radius,Color3f color) …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.