title: read an Object(customized) from ObjectInputStream
body: <p>So, I don't know why the Client part of my project give me this type of error</p>
  
  <p><code>Exception in thread "main" java.lang.ClassNotFoundException: Mining.FrequentPatternMiner
      at java.net.URLClassLoader$1.run(Unknown Source)
      at java.net.URLClassLoader$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Unknown Source)
      at java.io.ObjectInputStream.resolveClass(Unknown Source)
      at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
      at java.io.ObjectInputStream.readClassDesc(Unknown Source)
      at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
      at java.io.ObjectInputStream.readObject0(Unknown Source)
      at java.io.ObjectInputStream.readObject(Unknown Source)
      at JabberClient.main(JabberClient.java:81)
  </code></p>
  
  <p>In the Server part, I cast the FrequentPatternMiner variable and then i give it to the ObjectOutputStream</p>
  
  <pre><code>ObjectOutputStream out = new ObjectOutputStream(socket.getOutputStream());
  
  FrequentPatternMiner fpMiner=new FrequentPatternMiner(dataTarget, minsup);  
  fpMiner.salva("FP_"+nameFile+"_minSup"+minsup+".dat");
  System.out.println("Frequent Patterns \n"+fpMiner);
  
  out.flush();
  out.writeObject((Object)fpMiner);
  </code></pre>
  
  <p>In the Client part, i do this</p>
  
  <pre><code>ObjectOutputStream out = new ObjectOutputStream(socket.getOutputStream());
  ObjectInputStream in = new ObjectInputStream(socket.getInputStream());
  
  Object fpMiner=in.readObject();
  (((ObjectInput)in).readObject());
  System.out.println(fpMiner);
  </code></pre>
  
  <p>How would I fix my code? Can you help me?</p>