I'm trying to make a .jar file out of a java project I wrote in Eclipse and I'm following this tutorial to get it done. I went to my 'workspace' directory and created the .mf file outside my src folder and opened a cmd window on the same level as the .mf file. I started the command jar cmf mf-file.mf jartest.mf Class1.class Class2.class . . . but I have like 40 classes! Is this really the way to make a double-click runnable program to use??
            Asked
            
        
        
            Active
            
        
            Viewed 37 times
        
    0
            
            
         
    
    
        user2651804
        
- 1,464
- 4
- 22
- 45
- 
                    2Have you tried using eclipse tools to create Jar file `File` -> `Export..` -> `jar` or `runnable jar`)? – Pshemo Apr 01 '14 at 19:15
- 
                    1`jar cmf mf-file.mf jartest.mf *.class`? You should not put classes in the default package. – JB Nizet Apr 01 '14 at 19:15
- 
                    2I would use Ant if i wanted to build a jar without an IDE. Check out [this tutorial](http://www.tutorialspoint.com/ant/ant_creating_jar_files.htm). Here's [a question](http://stackoverflow.com/questions/502960/eclipse-how-to-build-an-executable-jar-with-external-jar) about how to do it with Eclipse. – jahroy Apr 01 '14 at 19:18
1 Answers
1
            In Eclipse, right-click on your project and select Export.  Under Java select Runnable JAR file and go from there.
 
    
    
        davidfmatheson
        
- 3,539
- 19
- 27
- 
                    Alright.. Well that was really quick and painless. Thank you, haha :-) – user2651804 Apr 01 '14 at 19:35