本文发表在 rolia.net 枫下论坛A Jar file is a compressed Java package. If this package contains a class which has a main() method, you can run it as
java -jar xxx.jar
If you want to want run it as a process, enter
start java -jar xxx.jar
or javaw xxx.jar
As a Java programmer, I have not yet got any opportunities to run an application by double clicking. This is why I said Java is not VB.
Indeed, some Jar files are "excutable" because they have one main() method.
In such a case, if you it use javaw.exe,
it will be run as a server process. You have seen it in the Task Manager|Process.
As a Java programmer, use on-line commands.
To "open" a jar file, you can first open Winzip.exe and then drop your jar file into Winzip. Jar file is essentially a kind of zip file.
Another waty to unzip a jar file is enter the commands
jar -xvf xxx.jar
Actually, you can reconfigue your Windows explorer so that jar files are open by Winzip.exe instead of javaw.exe, by default.
I have never tried it.更多精彩文章及讨论,请光临枫下论坛 rolia.net
java -jar xxx.jar
If you want to want run it as a process, enter
start java -jar xxx.jar
or javaw xxx.jar
As a Java programmer, I have not yet got any opportunities to run an application by double clicking. This is why I said Java is not VB.
Indeed, some Jar files are "excutable" because they have one main() method.
In such a case, if you it use javaw.exe,
it will be run as a server process. You have seen it in the Task Manager|Process.
As a Java programmer, use on-line commands.
To "open" a jar file, you can first open Winzip.exe and then drop your jar file into Winzip. Jar file is essentially a kind of zip file.
Another waty to unzip a jar file is enter the commands
jar -xvf xxx.jar
Actually, you can reconfigue your Windows explorer so that jar files are open by Winzip.exe instead of javaw.exe, by default.
I have never tried it.更多精彩文章及讨论,请光临枫下论坛 rolia.net