A
A
andreycha2010-11-09 22:46:54
Java
andreycha, 2010-11-09 22:46:54

Java: jar and exe?

Why do Java applications have their own file format (jar/ear/war) and not exe? Because Sun wanted it that way, or were there objective (technical?) reasons for that? CLR launches exe's quietly.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vlad Zhivotnev, 2010-11-09
@andreycha

For cross platform.

A
apangin, 2010-11-09
@apangin

jar/war is not just an application executable, it is a "package" of the application. By analogy with apk, msi, deb, etc.
In addition to the actual executable code, jar, being a regular zip archive, can contain resources, libraries, descriptors, manifests, and any other files that the application or system that uses it will need.
And, as already noted, an application in this format should work on different platforms.

D
dborovikov, 2010-11-11
@dborovikov

>CLR launches exe's quietly.
As far as I know, just the opposite. The exe calls clr which reads the bytecode inside the assembly. However, the same can be done with a jar file, for example, using jar2exe.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question