First off...what exactly is a .jar file good for and when should it be used? Is it a direct location to run a full Java app from? Because that's all I can gather from what I've read on them.
Second, whilst trying to create a .jar file from my terminal, the tutorial said to type, for example
All of this I understand and have manipulated to my needs and it all seems to work except for the "*.class" part. The tutorial says that that part tells the system to make a .jar file named "Example" that includes all files that end in "-.class". However, I get an error when I put that in that readsCode:
jar cmf mainClass.txt example.jar *.class
I've tried directing this to the public class (since it seems like it's asking for a specific file) but I get the exact same error, despite the fact that the public class Beer.class/Beer (I've tried both ways) DOES exist. What am I doing wrong?Code:
*.class : no such file or directory