Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / June 2005

Tip: Looking for answers? Try searching our database.

Eclipse can create jar everytime I save?

Thread view: 
aleicaro@libero.it - 07 Jun 2005 16:35 GMT
Hi,
Is it possible with eclipse 3 (or with a plugin) to create
automatically a jar file everytime I save a class. So everytime it will
rebuild the .class files it will recreate the .jar file.

Thank you
Alessandro Rossi
Ingo R. Homann - 08 Jun 2005 07:54 GMT
Hi,

> Hi,
> Is it possible with eclipse 3 (or with a plugin) to create
[quoted text clipped - 3 lines]
> Thank you
> Alessandro Rossi

Yes: When you save a class, it will automatically be compiled by Eclipse
(if you have selected "Build Automatically"). In the build-preferences,
you can add an ant-task and that can do whatever you want it to do, such
as building a jar-file. (This may slow down everything a bit, of course!)

Ciao,
Ingo
aleicaro@libero.it - 08 Jun 2005 08:27 GMT
Thank you for your precious help, but i'm still a newbie :). I can't
find where is build-preferences.
Can you still help me?

Thank you.
Ingo R. Homann - 08 Jun 2005 08:46 GMT
Hi,

> Thank you for your precious help, but i'm still a newbie :). I can't
> find where is build-preferences.
> Can you still help me?

Project -> Properties -> Builders

There you have the possibility to add a "New" Builder based on an ant-file.

Please consult an ant-tutorial/manual to learn how to go further from
this on. the ant-file might look like this:

- build.xml -
<?xml version="1.0"?>
<project name="JWAF" default="jar">
    <target name="jar">
        <jar destfile="deploy/JWAF.jar">
            <fileset dir="bin" />
        </jar>
    </target>
</project>

Ciao,
Ingo
aleicaro@libero.it - 08 Jun 2005 09:08 GMT
Hi, I followed your instructions, and I added an ANT file to the
builders, I tried and the ANT file works properly. But if I modify a
.java file in my project and then I save, I've seen that the builder
I've added is not executed...and my jar hasn't modified. Do you know
why?

Thank you
Alessandro Rossi
aleicaro@libero.it - 08 Jun 2005 09:15 GMT
Solved.
I've seen that on the build definition windows, in the tab "Build
options" there is a check "Run the builder during Auto build". I
checked it and all works.

Thank you very much.
Alessandro Rossi.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.