Ronald Fischer
8/16/2007 7:58:00 AM
> * Ronald Fischer <ronald.fischer@venyon.com> (12:05) schrieb:
>
> > filename.sub(/java$/,'class')
>
> I'd match the point too, not everything that ends with "java" is java
> source file: filename.sub(/\.java$/, '.class')
In general, yes, but in my case I *know* that the file ends in .java
anyway, so matching the dot is not so important.
> > This works fine, but I wonder whether there isn't a more
> > elegant way to do it.
>
> What is unelegant about that?
Maybe I did too much shell programming before ;-)
On shell level, I would do a
$(dirname $FILENAME)/($basename $FILENAME java)class
so I was thinking whether I might have overlooked some useful method
in the FilePath or File class which would be helpful here.
Thanks for the advice...
Ronald