You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Carlos Quiroz <ca...@rtse.com> on 2001/05/08 10:51:27 UTC
Jar files doesn't understand inner class
Hi I'm trying to use the jar task to create an applet distribution and
I'm using a file to feed the classes names to the jar task. However the
task doesn't take inner classes as <class>$<inner>.class, for example
with my file like this:
ui/ImageCanvas.class
client/TickerPanel.class
client/TickerPanel$1.class
client/SettingsPanel.class
It correctly jars the first two and last files but not the
TickerPanel$1.class
Any idea, is this a bug or just Am I doing something wrong?
Mys system:
Windows 2000
Sun's JDK 1.3
Ant 1.3
The task is like this
<target name="applet-jar" depends="applet-dep">
<jar jarfile="${html.dir}/client.jar">
<fileset dir="${resources.dir}/images"
includes="**/*.gif"/>
<fileset dir="${build.dir}"
includesfile="${build.dir}/dep.txt"/>
</jar>
</target>
I tried feeding directly the file to the jar but it is the same
Carlos Quiroz
Software Engineer
Financial Solutions
RTSe Finland Oy
Central phone number (+358-9-751 89 200)
Direct phone number (+358-9-751 89 224)
Fax number (+358-9-751 89 188)
Mobile (+358-40 5555 793)
E-mail mailto:carlos.quiroz@rtse.com
http://www.finland.rtse.com
http://www.rtse.com
Re: Jar files doesn't understand inner class
Posted by Nico Seessle <ni...@apache.org>.
Jar files doesn't understand inner classCan you try to modify the file that it reads
...
client/TickerPanel$$1.class
...
Maybe it's just the problem that Ant tries to handle $-things as a property and they need to be escaped normally (using a double-$).
Nico
----- Original Message -----
From: Carlos Quiroz
To: ant-user@jakarta.apache.org
Sent: Tuesday, May 08, 2001 10:51 AM
Subject: Jar files doesn't understand inner class
Hi I'm trying to use the jar task to create an applet distribution and I'm using a file to feed the classes names to the jar task. However the task doesn't take inner classes as <class>$<inner>.class, for example with my file like this:
ui/ImageCanvas.class
client/TickerPanel.class
client/TickerPanel$1.class
client/SettingsPanel.class
It correctly jars the first two and last files but not the TickerPanel$1.class
Re: Newbie question
Posted by Stefan Bodewig <bo...@apache.org>.
M. Nair <ma...@mediaone.net> wrote:
> I come from the "make" school of building a system and have a few
> questions on how the same could be achieved using ant.
Some concepts are quite different between Ant and make and unless you
adapt to Ant's way (at least a little), you probably won't become too
happy with Ant.
> (a) In Make, I could use the if [ -r *.xyz ] do blah blah blah...How
> can I do the same using ant?
The best way would probably be to write a custom task to do this in
one step. Otherwise, do something like
<target name="check">
<available file="triggering-file" property="file-is-there" />
</target>
<target name="do" depends="check" if="file-is-there">
do blah blah blah
</target>
> (b) How can I set ant up so that one can simulate the recursive
> make?
Several options are available
The built-in one: Use <ant> and hardcode the locations of all subbuild
files.
The preprocessor option: Autogenerate your top level build file by
some means (which will then use <ant> and hardcoded names) - see
M.J.P. van Leeuwen's Configure (link at
<http://jakarta.apache.org/ant/external.html>) for a way to do this.
The <anton> or <foreach> option: Ant2 will have a task named <anton>
that can invoke the same target in a couple of build files (specified
using patterns) - maybe the very next version of Ant will already have
something similar. Tim Vernum has written a Task named <foreach> that
does the same, you can find it in the archives of the ant-dev list.
> (c) I have a rules.mk when I build stuff using Make - how can one
> include an ant rules file(if one can be created) ?
I'm not familiar enough with make to know what a rules file might be.
As far as including is concerned, a very rudimentary approach is
described here <http://jakarta.apache.org/ant/faq.html#xml-entity-include>.
Stefan
Newbie question
Posted by M Nair <ma...@mediaone.net>.
Hello!
I come from the "make" school of building a system and have a few
questions on how the same could be achieved using ant.
(a) In Make, I could use the if [ -r *.xyz ] do blah blah blah...How can
I do the same using ant?
(b) How can I set ant up so that one can simulate the recursive make?
(c) I have a rules.mk when I build stuff using Make - how can one
include an ant rules file(if one can be created) ? Basically what I have
in my rules file is how to process certain files based on a sequence.
TIA
Manoj Nair
Re: Jar files doesn't understand inner class
Posted by Stefan Bodewig <bo...@apache.org>.
Carlos Quiroz <ca...@rtse.com> wrote:
> client/TickerPanel$1.class
Try to escape the $ with yet another $ as Ant interprets this as the
start of a property expansion.
client/TickerPanel$$1.class
Does this work?
Stefan