(JAVA) Use Command Prompt to create .jar file from multiple .class files

后端 未结 4 1287
时光说笑
时光说笑 2021-01-11 23:00

I have written a .java file, called Main.java, and have compiled it using the javac in the Windows Command Prompt. The compiler is creating multiple .class files (called Mai

4条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-11 23:22

    1. open cmd (windows+r type cmd)
    2. simipily type command as a "jar" without quatoes
    3. it will give some options and those usage.
    4. use what you want
    5. to create a jar file with class you to mention jar cfv filename.jar example.class example2.class etc..
    6. IF your using swing compile it with javac -deprecation SwingApplication.java but JDK version must be greater than version JDK1.1
    7. run java SwingApplication
    8. ALL THE BEst

提交回复
热议问题