Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Strange compile error concerning different regex packages

843810Sep 19 2005 — edited Sep 20 2005
Hi there,

I have a really strange problem when trying to build my sources with an ANT script. In Eclipse, this problem does not occur!
Here is the output:

[javac] C:\DEVELOPMENT\Workspaces\TAJ-1-CodingStandardsCustomChecks\src\com\giniality\taj\v1\checkstyle\plugin\UCImplClassPackageConstructorOnly.java:120: incompatible types
[javac] found : org.apache.regexp.RE
[javac] required: java.util.regex.Pattern
[javac] java.util.regex.Pattern p = this.getRegexp();

The compiler finds the org.apache regular expressions classes but complains that it needs the java.util variety. I already made sure that this.getRegexp() returns a java.util.regex.Pattern. I already explicitly imported the java.util.regex, tried to use java.util.regex.Pattern, but whithout success. In eclipse, this problem does not occur. Does anyone have an idea how I can point the javac to the correct regex package?
Thank you very much, because it seems I can't solve the problem on my own... :-(
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 18 2005
Added on Sep 19 2005
1 comment
125 views