Something about Jar files

jabber (jabber)
本文发表在 rolia.net/zh 相约加拿大网上社区枫下论坛
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/zh
(#17206@0)
2000-12-5 -05:00

回到话题: Help. .JAR can't run. When I click the file.jar, the harddisk will run for a while. Then, nothing happend. I click the JAVAW.exe in the \JAVA1.2.2\BIN, it's the same. Nothing will happen except the harddisk running.

回到论坛: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论

URL:   
http://www.rolia.net/zh/post.php?f=0&p=17206