title: How can I deserialize an object of a class that comes from another project?
body: <p>I want to import a class that I made in Eclipse to a project in Android Studio. I have been working on a project in Eclipse which involves a custom class called <code>WordList</code> and I have serialized an instance of this class into a binary file. </p>
  
  <p>Now, I have just started to learn about android programming and I wanted to make an app that uses this file. I want to use something like this to read the <code>WordList</code> object from that file:</p>
  
  <p><code>ObjectInputStream in = new ObjectInputStream(
                      new FileInputStream(new File( /*file name*/ )));
  return (WordList) in.readObject();</code></p>
  
  <p>But in order to do that, the program of course needs to know about the <code>WordList</code> class, otherwise I'll get a <code>ClassNotFoundException</code> at the cast. What I did first was to create a new <code>WordList</code> class in the Android project that was just an exact copy of the one in the Eclipse project, but then I got that exception: </p>
  
  <p><code>java.lang.ClassNotFoundException: Didn't find class "package_name.WordList" on path: DexPathList[[zip file "/data/app/my_project_directory-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]</code>. </p>
  
  <p>So apparently, these two identical <code>WordList</code> classes are in fact not identical. Why is it so? Is there a way for me to import the class from the Eclipse project into the Android Studio project, so that I actually can use the very same class? Or is there a way to make the program realize that the file actually contains a serialized <code>WordList</code> object?</p>