Java (and stackoverflow) newbie here, first post ever, so please be patient. Using windows command line interface I can't generate an executable .jar file, starting from a .class file. Seems like it should work, but it doesn't. Why, what am I missing?
I'm in the Windows cmd "black box", in a folder with Test.class, an app which simply displays "hello world" to the console. As per online videos, I try:
c:\junk\java -jar -cfv myJar.jar Test.class Error: Unable to access jarfile myJar.jar
I thought the -c switch meant create, so I don't understand the "unable to access"
btw, no problem compiling the .java to the .class using javac.
Windows 11, Java version "20.0.1" 2023-04-18