引文自 InfoWorld JAVAWORLD 文章

To execute a jar file, you can use the用了 JDownloader 了覺得實在很讚,不過,由於它是 .jar 的檔案,所以要把它加到面板上時(Gnome)時,會直接用解壓縮程式來開啟,上網爬文後,才發現原來要用上述的語法才能用,把它記下來,以免下次忘記!java
command's
option. For example, say you have a runnable jar file called -jar
myjar.jar
. Because the file is runnable, you can execute it like this:. java -jar myjar.jar