I’m running jar in order to create a JAR file with the command:
jar cmf manifest.txt generatedParser generator gui resource
generatedParser, generator, gui, and resource are directories, but jar doesn’t read them, complaining that:
java.io.FileNotFoundException: generatedParser (Is a directory)
But I was under the impression that jar would recursively read directories and according to the example in Creating a JAR File, the directories audio and images were read just fine. So why doesn’t it work, what am I missing? I want to generate a JAR application that contains the packages generatedParser, generator, gui and resource. They are normal uncompressed directories that contain class files.
The
fflag indicates the presence of the jar file name following the manifest file name on the command line. The correct command line would beThe error message is the result of
jartrying to use the directorygeneratedParseras the jar file — it doesn’t work out very well, as you can see.