title: How to execute a .RAR file
body: <p>I downloaded an application which was in <code>.RAR</code> file. I am having trouble executing the application. I have tried two ways of executing it.</p>
  
  <p>First Attempt: </p>
  
  <p>After viewing the <code>rar</code> contents, I figured out that it has proper manifest file (Stating the main class to execute), so i should change the file name to <code>.jar</code> and try executing it. I did that and ran the following command:</p>
  
  <pre><code>java -jar filename.jar
  </code></pre>
  
  <p>And received the following error:</p>
  
  <blockquote>
    <p>Invalid or corrupt jarfile filename.jar</p>
  </blockquote>
  
  <p>Second Attempt: I decided to extract the file and try it manually. I extracted the file on my desktop and it created the specified folder structure. And then I ran this command</p>
  
  <pre><code>java -cp .:./Users/My/Desktop/ExtractedFolder/ MainClassName.class
  </code></pre>
  
  <p>And received the following error:</p>
  
  <blockquote>
    <p>Could not find or load main class MainClassName</p>
  </blockquote>
  
  <p>How do I execute this application?</p>
  
  <p>P.S:
  <code>ExtractedFolder</code> is the folder which was created after unzipping the file. It has heirarchy like </p>
  
  <pre><code>ExtractedFolder
  |_ META-INF
  |__|__MANIFEST.MF
  |__org
  |__|__folder_1
  |__|__|__folder_2
  |__|__|__|__folder_3
  |__|__|__|__|__MainClassName.class
  |__|__|__|__|__OtherClass.class
  |__|__|__|__|__|__UtilFolder
  |__util_1
  |__|__SubUtil
  </code></pre>