package java.util.regex does not exist (codenameone) -


I am creating an application in coding (java) and it requires a quick email check but regex Whenever I create my app, I get an error that the java.util.regex package does not exist.
Netbeans do not give any error when compiling and I can use source code from all sections in java.util.regex but

I have done some searches on the web but some of the usage Could not even get it.
I use Netbeans 7.4 and JDK 7 (JRE 1.7.0_51)

This is the mail check for the check:

  import java.util.regex .Matcher; Import java.util.regex.Pattern; Protected Boolean Checkmail (String Email) {String EMAIL_PATTERN = "^ [_A-Za-z0-9 - \\ +] + (\\. [_A-Za-z0-9 -] +) * @" + " [A-Za-Z0-9 -] (. \\ [one-zA-Z0-9]) * (. \\ [a-zA-z] {2,}) $ "; Pattern Pattern = Pattern.compile (EMAIL_PATTERN); Matcher matcher = pattern.matcher (email); Return matcher.matches (); }  

I think the error is:

  F: \ pentera \ document \ netbusiness project \ therapieapp \ src \ be \ pantera \ TherapieApp \ RegisterPage. Java: 25: Error: package java.util.regex import java.util.regex.Matcher is not present; F: \ Pantera \ Documents \ NetBeansProjects \ TherapieApp \ src \ be \ pantera \ TherapieApp \ RegisterPage.java: 26: Error: package java.util.regex import java.util.regex.Pattern does not exist;  

- Edit - This problem is related to the code name so I changed the title. Thanks to those who answer before editing. I do not think this problem may be related to Codenamon, my apologies.

Codename One does not support the package in Java SE stack nor many other packages. Java SE is too big for mobile, our current Hello world for iOS is 3 MB and if we support full Java SE then it will be approximately 18 MB. This is also true for Windows Phone, RIM etc.

There are several solutions with a port.

You can see the one supported classname in javaDocs:


Comments