This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes IDEs, Version Control and other tools and the fly likes Can you add a .sar file to Eclipse? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Can you add a .sar file to Eclipse?" Watch "Can you add a .sar file to Eclipse?" New topic
Author

Can you add a .sar file to Eclipse?

M. Kurup
Greenhorn

Joined: Oct 03, 2002
Posts: 3
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30136
    
150

Maya,
Welcome to JavaRanch!

What is a sar file?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Santosh Maskar
Ranch Hand

Joined: Jul 02, 2003
Posts: 226
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

Joined: Apr 14, 2004
Posts: 10336

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).


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
M. Kurup
Greenhorn

Joined: Oct 03, 2002
Posts: 3
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

Joined: Apr 14, 2004
Posts: 10336

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

Joined: Aug 26, 2003
Posts: 2
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30136
    
150

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

Joined: Dec 27, 2004
Posts: 1
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
 
subject: Can you add a .sar file to Eclipse?
 
Similar Threads
getting back into Java
xpetstore deployment in JBoss 3.2.3
not getting jmx console
Newbie to JBoss
where to put my application?