Corrupt JAR file?

M

Mike

Hi,

I am trying deploy a JAR file to WebSphere Application Server and am
getting corrupt or incomplete error message. The JAR file contents is :

0 Tue Jan 02 16:15:12 GMT 2007 META-INF/
71 Tue Jan 02 16:15:12 GMT 2007 META-INF/MANIFEST.MF
1986 Tue Jan 02 13:42:36 GMT 2007 HelloServlet1.class
93 Tue Jan 02 13:45:54 GMT 2007
HelloServletsTextMessages_fr_FR.properties
83 Tue Jan 02 13:46:32 GMT 2007
HelloServletsTextMessages_en_US.properties


Sun's JAR file tutorial makes no mention of the first entry
"META-INF/". Does this JAR file look OK to you? Is there anything else
I can do to verify the jar file?

Does anyone know any good resources on the internet that might be
useful?

Thanks in advance,

Mike
 
D

Daniel Pitts

Mike said:
Hi,

I am trying deploy a JAR file to WebSphere Application Server and am
getting corrupt or incomplete error message. The JAR file contents is :

0 Tue Jan 02 16:15:12 GMT 2007 META-INF/
71 Tue Jan 02 16:15:12 GMT 2007 META-INF/MANIFEST.MF
1986 Tue Jan 02 13:42:36 GMT 2007 HelloServlet1.class
93 Tue Jan 02 13:45:54 GMT 2007
HelloServletsTextMessages_fr_FR.properties
83 Tue Jan 02 13:46:32 GMT 2007
HelloServletsTextMessages_en_US.properties


Sun's JAR file tutorial makes no mention of the first entry
"META-INF/". Does this JAR file look OK to you? Is there anything else
I can do to verify the jar file?

Does anyone know any good resources on the internet that might be
useful?

Thanks in advance,

Mike

Assuming you have added only HelloServlet1.class and
HelloServletsTextMessages*.properties to your JAR, it looks fine. One
of the main distinctions between a JAR file and a ZIP file (they are
the same format after all), is that a JAR contains a
META-INF/MANIFEST.MF file.

Hope this helps.
Daniel.
 
L

Lew

Daniel said:
Assuming you have added only HelloServlet1.class and
HelloServletsTextMessages*.properties to your JAR, it looks fine. One
of the main distinctions between a JAR file and a ZIP file (they are
the same format after all), is that a JAR contains a
META-INF/MANIFEST.MF file.

Normally servlets are packed in WAR files, not JAR files.

- Lew
 
A

Andrew Thompson

Daniel Pitts wrote:
.....
....
....One
of the main distinctions between a JAR file and a ZIP file (they are
the same format after all), is that a JAR contains a
META-INF/MANIFEST.MF file.

This one does. Many do. But is it not necessary in
*all* situations.

If a jar has a main*, but is launched by web-start, the
main can be identified in the JNLP. If a jar contains
an applet, the applet can be identified in the HTML.
Given one Jar might contain one applet, and two
applications, this is quite handy.

Further, if this Jar is a 'library' it might also not need
a manifest.

* Sure, the manifest file can provide information
beyond 'main class', but that seems to be what
they are most commonly used to identify.

(+ see what Lew was saying, re. JAR/WAR)

Andrew T.
 
M

Mike

Sorry on two counts. Didn't read your profile and meant to post to
comp.lang.java.programmer
 
M

Mike

My main concern about the JAR file was the first line shown below which
had its first entry as zero, which I am guessing is file size. However,
since three people read this mesaage and did not comment on it I assume
this is normal.

0 Tue Jan 02 16:15:12 GMT 2007 META-INF/
71 Tue Jan 02 16:15:12 GMT 2007 META-INF/MANIFEST.MF
1986 Tue Jan 02 13:42:36 GMT 2007 HelloServlet1.class
93 Tue Jan 02 13:45:54 GMT 2007
HelloServletsTextMessages_fr_FR.properties
83 Tue Jan 02 13:46:32 GMT 2007
HelloServletsTextMessages_en_US.properties
 
A

Andrew Thompson

Mike wrote:

Please refrain from top-posting.
My main concern about the JAR file was the first line shown below which
had its first entry as zero, which I am guessing is file size. However,
since three people read this mesaage and did not comment on it I assume
this is normal.

0 Tue Jan 02 16:15:12 GMT 2007 META-INF/

No. I meant to comment, but forgot.
This simply represents the directory in which the
manifest is stored. If using packages, you should
also see lost of 'empty' entries for each directory
in the package statements, AFAIR.

Oh, and the email thing - you hit the 'wrong button',
(chuckle) I know the feeling.. but am hoping you
will take more care in future.

Andrew T.
 
M

Mike

Not sure what "top-posting" is. Thanks for taking time to comment on
the manifest directory. Don't worry, in future, I will be especially
careful about clicking the right button.
 
A

Andrew Thompson

Mike said:
Not sure what "top-posting" is.

"Your soaking in it"*

Or to put that a far less obscure way. You were
doing it right then, by *posting* your reply, on
*top* of what you were replying to.

Notice how you can read this response, logically
from top to bottom?

* From an ancient Oz ad, for dish-washing detergent.

Andrew T.
 
I

Ian Wilson

Mike top-posted:
Not sure what "top-posting" is.

Allow me to illustrate ...

A: Written English conversations normally flow from top to bottom.

Q: What do you mean?

A: Because it makes it harder to follow the conversation.

Q: Why shouldn't I top-post?

Now read the above four sentences in reverse (top-posted) order.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top