I am trying to create a jar file with many classes. Using the following command
C:\Users\use\Desktop\SDE_7_SSH\eclipse\new\charge\src\jar> jar cf charge.jar *.class
But it is throwing an error 'jar' is not recognized as an internal or external command, operable program or batch file.
In my jar folder (C:\Users\use\Desktop\SDE_7_SSH\eclipse\new\charge\src\jar), i am having two other folders named "f1", "f2", which inturn having classes.
preguntado el 24 de agosto de 12 a las 06:08
You need to run the jar command from bin directory. For example on linux system, I would either go to my directory
Y luego ejecutar
jar cf charge.jar *.class
or else run it with the full path of java binary
/usr/local/java/jdk1.6.0_01/bin/jar cf charge.jar *.class
Use the complete path to the jar program, which is in Java's bin directory. Like
jdk_with_version\bin\jar cvf *.class