facebook

classpath [Closed]

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #206292 Reply

    Andrew Cheng
    Participant

    MyEclipse Perspective flag my regular expression routine as error. With Ant build.xml, I include it in the path. How MyEclipse Perspective know
    about this library? 😕

    #206297

    Riyad Kalla
    Member

    How MyEclipse Perspective know
    about this library?

    You can’t hide anything from us!

    Seriously though, can you give us more information about what you are seeing? “regular expression routine”, is this an expression? Its in your Ant build script? I’m not sure what you are asking.

    #206314

    Andrew Cheng
    Participant

    RE is just a java class define in org.apache.regexp.*; – RE (see bellow)
    I include the path in classpath in build.xml, so there is no problem in
    my original ANT build. MyEclipse mark RE as error.

    import org.apache.regexp.*;
    //import java.util.Vector;

    public class Validation {
    public static boolean isBlankString(String str) {
    if (str == null) return true;
    return (str.length() == 0);
    }
    //
    public static boolean isValidMin(String str) {
    try {
    RE min = new RE(“^(\\d{10})$”);
    return (min.match(str));
    } catch (Exception ex) {
    ex.printStackTrace();
    return false;
    }
    }

    #206316

    Riyad Kalla
    Member

    You need to add the apache regexp JAR file to your build path in Eclipse (this isn’t a MyEclipse thing). Eclipse does not pickup these from your Ant script.

    You need to right click on your project root, go to Properties click on Java Build Path, then select the “Libraries” tab. Here you can click Add JAR/ZIP and add the JAR that contains this class. If its external to your project, use the “Add External” feature.

    #206318

    Andrew Cheng
    Participant

    Ok, solved

    #206327

    Riyad Kalla
    Member

    Glad to hear it.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: classpath [Closed]

You must be logged in to post in the forum log in