Home > Archive > Java Help > June 2005 > Eclipse can create jar everytime I save?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Eclipse can create jar everytime I save?
|
|
| aleicaro@libero.it 2005-06-07, 4:03 pm |
| 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 2005-06-08, 8:59 am |
| Hi,
aleicaro@libero.it wrote:
> 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
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 2005-06-08, 8:59 am |
| 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 2005-06-08, 8:59 am |
| Hi,
aleicaro@libero.it wrote:
> 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 2005-06-08, 8:59 am |
| 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 2005-06-08, 8:59 am |
| 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.
|
|
|
|
|