This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 29245 - Ant 1.5.1 needs Java 1.4: jakarta-oro alternative?
Summary: Ant 1.5.1 needs Java 1.4: jakarta-oro alternative?
Status: VERIFIED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Ant (show other bugs)
Version: 3.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@projects
URL:
Keywords: JDK_SPECIFIC
Depends on:
Blocks:
 
Reported: 2002-12-03 17:06 UTC by sitongia
Modified: 2005-07-15 07:49 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sitongia 2002-12-03 17:06:11 UTC
I updated Ant to 1.5.1, and when I run it in the IDE, I get this error:

java.lang.NoClassDefFoundError: java/util/regex/PatternSyntaxException
        at 
org.apache.tools.ant.util.regexp.Jdk14RegexpMatcher.getCompiledPattern(Jdk14Regex
pMatcher.java:95)
 ...

This is Mac OS X 10.2.2, so I know that Java is 1.3.1, and I shouldn't expect to find
java.util.regex.  However, I'm trying to get this working with jakarta-oro, which I've
done with Ant 1.5.1 outside of the IDE.  How do I do this inside the IDE?  I've tried copying 
jakarta-oro-2.0.6.jar into the modules/ext directory, but that didn't work.

I also tried getting this to work with Ant 1.4.1 before I updated, but couldn't get that to
work with jakarta-oro, either.

Thanks for your help.

==Leonard Sitongia

sitongia@ucar.edu
Comment 1 _ mruflin 2002-12-03 17:47:03 UTC
Please, don't use Issuezilla for support questions!
Issuezilla should only be used for feature requests or bug 
reports.

You should ask on nbusers mailing list instead. I 
recommend using the newsgroup interface 
(news.netbeans.org).
Comment 2 David Konecny 2002-12-03 17:54:36 UTC
Check <http://ant.netbeans.org/faq.html> and
<http://ant.netbeans.org/docs/tasks_classpath.html>. For the moment
closing this as not an issues.
Comment 3 David Konecny 2002-12-12 18:39:08 UTC
.
Comment 4 Jesse Glick 2002-12-16 13:05:54 UTC
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15390

has been filed against Ant. There still remains to make a workaround
in NetBeans though, depending on if and when the Ant patch is accepted.

sitongia - I think you can set an explicit regexp factory using a
project property; please check the Ant manual. (And if this succeeds
as a workaround, please mention that fact in this bug report!)
Comment 5 Jesse Glick 2003-01-06 17:56:12 UTC
Try setting ant.regexp.regexpimpl to
org.apache.tools.ant.util.regexp.JakartaOroRegexp, acc. to Stefan's
comments in the Ant bug report.
Comment 6 David Konecny 2003-01-07 14:52:17 UTC
At the moment it is not possible to workaround this problem in NB Ant
module, because project properties are ignored. See the
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15390> for more
details.

How users can workaround it was summarized in threads
<http://www.netbeans.org/servlets/ReadMsg?msgId=429376&listName=nbusers>
and
<http://www.netbeans.org/servlets/ReadMsg?msgId=429393&listName=nbusers>.
The second workaround is preferred.

Closing issue as WONTFIX and will wait till the 15390 is resolved.
Then we will see. (or is LATER more appropriate?)
Comment 7 Jesse Glick 2003-01-08 16:16:50 UTC
So what if the project property is ignored? Set it as a system
property as a workaround.
Comment 8 David Konecny 2003-01-09 11:35:26 UTC
Oops! For some reason I thought that I cannot modify system
properties. Workarounded in file:

Checking in src/org/apache/tools/ant/module/run/TargetExecutor.java;
new revision: 1.27; previous revision: 1.26
Comment 9 Jesse Glick 2003-06-03 23:24:30 UTC
Forgot target milestone.
Comment 10 Jesse Glick 2003-12-09 16:32:20 UTC
Will remove workaround in the trunk: the bug is fixed in Ant starting
with 1.5.3 (maybe 1.5.2, but whatever); and anyway it only affects
users of JDK 1.3 or earlier, whereas NB in the trunk now requires JDK 1.4.
Comment 11 Jesse Glick 2003-12-10 21:18:32 UTC
Note: Ant BT #15390 is still open for Ant 1.6 under a different
meaning: the regexp impl must be set as a system property (Ant
properties do not work). That also affects NetBeans, but at least the
JDK 1.4 regexp impl will be selected properly, so you would only care
if you needed a different regexp impl. If you do, you will need to set
it in ~/ide.cfg using e.g.

-J-Dant.regexp.regexpimpl=org.apache.tools.ant.util.regexp.JakartaOroRegexp
Comment 12 Jesse Glick 2003-12-10 21:22:16 UTC
Removing workaround in the trunk:

committed     Up-To-Date  1.34       
ant/src/org/apache/tools/ant/module/run/TargetExecutor.java
committed     Up-To-Date  1.21        ant/www/faq.html
Comment 13 Marian Mirilovic 2005-07-15 07:49:07 UTC
closed