This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
Hi all I have the following dir: dir\com // dir for class files dir\images // dir for images I have tried the following command: jar cfv MyJar.jar com/*.class images/*.gif then: jar cvmf MANIFEST MyJar.jar com/*.class images/*.gif (this manifest includes the Main-Class property with "com.Manager value") and the jar is runnable and no problem.. and now when trying these commands, the jar dosen't include the images !! then I have changed the command to jar cvmf manifest MyJar.jar com images its include the images but its not runnable (I have extracted the jar and the manifest it all right and every thing is as I want)
Are you running the JAR from inside an IDE? If so, you might experience different behaviour when running it outside the IDE, since some IDEs (like NetBeans) have their own path settings which they apply. Hence, when you run it from the IDE it works fine, and when you run it outside it suddenly cant find all of the files (or viceversa).
I have alwayes used command limes to package my applications. after downloading netbeans, I am unable to use the first two commands (unable means, they don't work) (please note, I am not creating my jar using netbeans, and trying to run it using it)