Running JAR file on Windows

前端 未结 25 2146
故里飘歌
故里飘歌 2020-11-22 01:57

I have a JAR file named helloworld.jar. In order to run it, I\'m executing the following command in a command-line window:



        
25条回答
  •  长情又很酷
    2020-11-22 02:22

    If you need to distribute your .jar file and make it runnable at other people's Windows computers, you can make a simple .bat file like this in the command prompt:

    java -jar MyJavaTool.jar
    

    and place the .bat file in the same directory as your .jar file.

提交回复
热议问题