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
2000-12-5 -04:00
This post has been archived. It cannot be replied.
Page address has been copied. To share, click to copy page address.
Share Online by QR Code

Back To Topic: 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.

Back To Forum: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论