title: Export a jar file from Eclipse or Command Line
body: <p>This is my first post ever but I intend to use this more often in the future so please be critical if I do something wrong.</p>
  
  <p>I have done research on the topic and have already attempted everything from using the command line to Eclipse's File>export>jar and choosing the appropriate options.</p>
  
  <p>Basically I have attempted everything suggested in the following two links:</p>
  
  <p><a href="https://stackoverflow.com/questions/423938/java-export-to-an-jar-file-in-eclipse">Java: export to an .jar file in eclipse</a></p>
  
  <p><a href="http://docs.oracle.com/javase/tutorial/deployment/jar/basicsindex.html" rel="nofollow noreferrer">http://docs.oracle.com/javase/tutorial/deployment/jar/basicsindex.html</a></p>
  
  <p>The results of my efforts are:
  1) a jar file is created
  2) when I try to run it the error is "Failed to load Main-Class manifest attribute from test.jar"</p>
  
  <p>I assure you that I have indeed created a "manifest.txt" file in my project that consists of 
  "Main-Class: Login
  "
  I even include a newline because I hear that is necessary in some instances.</p>
  
  <p>Does anyone know what I could be missing? Or better yet can anyone please provide an extremely detailed explanation of how to create a jar. This could be either from command line or eclipse.</p>
  
  <p>My current project is setup where I have three java files in my workspace: Login, NewFrame, and NewUser. Login has the main method which will eventually call the other files. These three files are in the default package. The projects name is JavaVersion. </p>
  
  <p>Thanks.</p>