File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can you add a .sar file to Eclipse?

 
M. Kurup
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, all.

I'm trying to test out the JBoss uuid-key-generator.sar. In order to have the code compile, I need to add this sar file to the Eclipse environment. Well, I did, or at least I thought I did.

When I created the project, I selected "Add jar", and added in the .sar file.

Obviously, this was a mistake, as I get the error:

2Illegal type of archive for required library: 'C:\jboss\jboss-4.0.0\server\standard\deploy\uuid-key-generator.sar' in project Test UUID GeneratorTest UUID GeneratorDecember 8, 2004 3:24:50 PM

I'm wondering if there is some magic to be able to use this sar file within the Eclipse environment.

Anyone got any suggestions?

Thanks,
Maya
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33697
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maya,
Welcome to JavaRanch!

What is a sar file?
 
Santosh Maskar
Ranch Hand
Posts: 226
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jeanne Boyarsky:
Maya,
What is a sar file?


I think this is a type mistake , and it will be ear.

Thanks

Santosh!
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No its not. A sar is a JBoss-specific archive. I would doubt you can add sars directly to Eclipse. But you could rename the sar to jar then add it. Of course you need to keep it as a sar for JBoss to use it properly - since there is a ordering priority to what is deployed (sars, before ears, before jars, before wars I think).
 
M. Kurup
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, all. Paul is right ... a .sar _is_ a real archive type. I've seen it defined as a service archive. If you open one using Winzip, it basically is a jar file with a different extension.

I did successfully use the sar file by just changing the extension to .jar, but I can't help feeling that this is not an ideal solution. After all, I shouldn't need to undo the original bundling to develop, then deploy back on JBoss using the original sar file ... sounds really backwards.

I guess I can live with it, but I will continue to be uneasy.

Cheers,
Maya
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know if you are using it but the JBoss IDE plugin for Eclipse may well handle sars. I haven't tried it but it might be worth looking at the docs for the plugin to see.
 
Transbuerg Tian
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, all friends, I meet the same questions too.
but this time I have to use resin plugin with eclipse.
in resin lib directory, there have a C:\resin-3.0.10\lib\LICENSE.isorelax file , you know , C:\resin-3.0.10\lib\LICENSE.isorelax is now a jar format file , so
I meet the following error.

Illegal type of archive for required library: 'C:\resin-3.0.10\lib\LICENSE.isorelax' in project myResin

any one could help me?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33697
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Transbuerg,
Is this file used during compilation or just runtime? If it is only used at runtime, you can add the directory to the path (as an external directory) rather than trying to include the specific file.
 
Nick Caggiano
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got around the follwing errors:

Illegal type of archive for required library: 'C:\resin-3.0.10\lib\LICENSE.isorelax'

Illegal type of archive for required library: 'C:\resin-3.0.10\lib\LICENSE.retroweaver'

by just taking those two files out of the required jars ("Project->Properties->Java Build Path->Libraries". Remove RESIN_HOME/lib/LICENSE.*") Resin needs to be able to see these files (don't delete them), but eclipse doesn't require them for the resin plugin.

Good luck.
[ December 27, 2004: Message edited by: Nick Caggiano ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic