Hi there. Im here concerning the java.util.regex class. The problem is that the class won't import! javac is throwing a non-recognised symbol error "regex". I get the same error from Tomcat aswel when I try to import the class in a JSP or Servlet.
Is regex an extension to java? do I have to download any packages?
PS: Im using J2SDK v1.4.2
thanks.
-
Problem with Regex (2 messages)
- Posted by: Michael Evans
- Posted on: July 22 2003 18:52 EDT
Threaded Messages (2)
- Problem with Regex by Rene Zanner on August 01 2003 08:02 EDT
- here is the fix by Tahir Faqir on October 25 2005 16:50 EDT
-
Problem with Regex[ Go to top ]
- Posted by: Rene Zanner
- Posted on: August 01 2003 08:02 EDT
- in response to Michael Evans
Hi,
java.util.regex is the _package_ containing the jdk regex _classes_ as java.util.regex.Pattern and java.util.regex.Matcher. To import the whole package, you have to use import java.util.regex.*;
I recommend a good book about Java development in general.
SCNR,
René -
here is the fix[ Go to top ]
- Posted by: Tahir Faqir
- Posted on: October 25 2005 16:50 EDT
- in response to Rene Zanner
You need to go to project properties and in the library tab locate the JRE System Library entry and hit edit. By default it uses an older jdk in the eclipse folder within WSAD. change it to use WebSphere v5.1 jre.
Another thing tell the project to use the workspace compiler settings on the compiler tab in project properties. Then go to Window->preferences->Java->Compiler make sure it has 1.4 compliance turned on.
This's what I had to do to get the import working for java.util.regex.*
Thanks
Tahir