File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes Getting while using jar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Getting while using jar" Watch "Getting while using jar" New topic

Getting while using jar

Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hello All,

I'm trying for a small session bean example. I have a directory structure with all classes available in com/ejb/session/ folder and all xml files in META-INF folder. Both META-INF and com folders are available in my project folder c:/projects/EJB/FirstEJB.

When I ran C:\projects\ejb\FirstEJB>jar cvfm FirstEJB.jar com META-INF
I'm getting an exception com (Access is denied)
at Method)

Please let me know, what made this exception to come and how to resolve it.

Thanks in advance.
Mukhtiar Ahmed

Joined: Jun 27, 2007
Posts: 7

used this command for creating jar

jar cvfM FirstEJB.jar com META-INF

please used M stwich which are tell command do not creating a manifest file for the entries

Sumit Malik
Ranch Hand

Joined: Jan 05, 2007
Posts: 84
Hey Chandra do try this option

jar cvfM FirstEJB.jar -C com/ META-INF/ .

I hope this would solve your issue.

Cheers !!!
Sumit Malik

If at first you don't succeed, don't try skydiving
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Thanks to you all. It worked for me.
I agree. Here's the link:
subject: Getting while using jar
jQuery in Action, 3rd edition