must be missing something simple...

Discussion in 'Java' started by luca passani, Sep 5, 2003.

  1. luca passani

    luca passani Guest

    ....I am sure I'll feel stupid when I hear what I got wrong:

    Ssolittle.java
    =====================================================================

    import java.util.regex.*;


    public class Ssolittle {


    private void parsePage(String html) {

    Pattern p;

    p = Pattern.compile("aaa");
    Matcher m = p.matcher (html);

    }
    }
    =====================================================================

    C:\SSO\servlet>java -version
    java version "1.4.2_01"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06)
    Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode)

    C:\SSO\servlet>javac Ssolittle.java
    Ssolittle.java:2: Package java.util.regex not found in import.
    import java.util.regex.*;
    ^
    1 error

    C:\SSO\servlet>


    What am I doing wrong? all others java.util.* libs work OK

    thanks

    luca
     
    luca passani, Sep 5, 2003
    #1
    1. Advertising

  2. luca passani

    luca passani Guest

    Got it. It was actually a Java gothca.

    In spite of the fact that I had installed the 1.4.2 JDK,
    windoes kept invoking the old javac compiler...

    thanks

    luca


    luca passani wrote:
    >
    > ...I am sure I'll feel stupid when I hear what I got wrong:
    >
    > Ssolittle.java
    > =====================================================================
    >
    > import java.util.regex.*;
    >
    > public class Ssolittle {
    >
    >
    > private void parsePage(String html) {
    >
    > Pattern p;
    >
    > p = Pattern.compile("aaa");
    > Matcher m = p.matcher (html);
    >
    > }
    > }
    > =====================================================================
    >
    > C:\SSO\servlet>java -version
    > java version "1.4.2_01"
    > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06)
    > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode)
    >
    > C:\SSO\servlet>javac Ssolittle.java
    > Ssolittle.java:2: Package java.util.regex not found in import.
    > import java.util.regex.*;
    > ^
    > 1 error
    >
    > C:\SSO\servlet>
    >
    > What am I doing wrong? all others java.util.* libs work OK
    >
    > thanks
    >
    > luca
     
    luca passani, Sep 5, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kevin Spencer

    Re: I'm missing something simple

    Kevin Spencer, May 20, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    316
    =?Utf-8?B?Y2N1cnZleQ==?=
    May 20, 2004
  2. JROCKS11
    Replies:
    4
    Views:
    1,786
  3. Mark M
    Replies:
    16
    Views:
    725
    Chris Uppal
    Mar 5, 2004
  4. SB
    Replies:
    6
    Views:
    322
    Old Wolf
    Apr 23, 2004
  5. John Abel

    Missing Something Simple

    John Abel, Jul 12, 2005, in forum: Python
    Replies:
    2
    Views:
    271
    Dennis Lee Bieber
    Jul 12, 2005
Loading...

Share This Page