Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » How to tell Eclipse to generate a *.jar instead of classes?
How to tell Eclipse to generate a *.jar instead of classes? [message #512061] Wed, 03 February 2010 13:43 Go to next message
Eclipse UserFriend
Is there a way to tell Eclipse not only to generate classes but to automatically create a Manifest and put everything into a target.jar archive?

How do I do this?

Ben
Re: How to tell Eclipse to generate a *.jar instead of classes? [message #512121 is a reply to message #512061] Wed, 03 February 2010 19:44 Go to previous messageGo to next message
Eclipse UserFriend
If you're trying to write a build script, then write a build script. Implement your required tasks in an Ant build.xml and either run it from the command line or from Eclipse.
Re: How to tell Eclipse to generate a *.jar instead of classes? [message #513540 is a reply to message #512121] Wed, 10 February 2010 09:25 Go to previous messageGo to next message
Eclipse UserFriend
David M. Karr wrote on Wed, 03 February 2010 19:44
If you're trying to write a build script, then write a build script. Implement your required tasks in an Ant build.xml and either run it from the command line or from Eclipse.


So the only way is through Ant script built.xml

There is no menu or option within Eclipse itself?

Ben
Re: How to tell Eclipse to generate a *.jar instead of classes? [message #513694 is a reply to message #513540] Wed, 10 February 2010 15:04 Go to previous messageGo to next message
Eclipse UserFriend
"Ben" <bxstover@yahoo.co.uk> wrote in message
news:hkuflk$9fb$1@build.eclipse.org...
> David M. Karr wrote on Wed, 03 February 2010 19:44
>> If you're trying to write a build script, then write a build script.
>> Implement your required tasks in an Ant build.xml and either run it from
>> the command line or from Eclipse.
>
>
> So the only way is through Ant script built.xml
>
> There is no menu or option within Eclipse itself?
>

Have you looked at File / Export / Java / Jar File?

Namaste, Bruce
Re: How to tell Eclipse to generate a *.jar instead of classes? [message #514083 is a reply to message #512061] Fri, 12 February 2010 06:34 Go to previous messageGo to next message
Eclipse UserFriend
Bruce's solution is fine. You can even save your "export" description as a ".jardesc" file, so you can regenerate the jar in just two clicks time Razz

Furthermore, if your gonna reference the project from a J2EE project (say a web application, for instance), the "J2EE module dependencies" is your friend here, as you can refer to the project and Eclipse will "jar" it by itself.

Hope this helps.
Re: How to tell Eclipse to generate a *.jar instead of classes? [message #516499 is a reply to message #514083] Wed, 24 February 2010 04:06 Go to previous messageGo to next message
Eclipse UserFriend
Miguel Angel wrote on Fri, 12 February 2010 06:34
You can even save your "export" description as a ".jardesc" file, so you can regenerate the jar in just two clicks time


Ok, I can create a jar file with

File / Export / Java / Jar File

but how do I create the mentioned .jardesc file?
I found no appropriate option for that.
Is it automatically created? Where is it stored?

Can I automatically let Eclipse create and equivalent Ant Script?

Ben
Re: How to tell Eclipse to generate a *.jar instead of classes? [message #516526 is a reply to message #516499] Wed, 24 February 2010 05:51 Go to previous message
Eclipse UserFriend
Il 24/02/2010 10.06, Ben ha scritto:
> but how do I create the mentioned .jardesc file?
> I found no appropriate option for that.

After selecting the JAR name in the JAR export wizard, click to "Next"
and check "Save the description of this JAR in the workspace". Then
specify where to save and hit "Next" or "Finish".
Previous Topic:JDT Installation failed
Next Topic:Missing Hibernate under "New/Other"
Goto Forum:
  


Current Time: Sat Mar 15 00:02:28 EDT 2025

Powered by FUDForum. Page generated in 0.05128 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top