Thread: Anyone can help me with epicurus InetAddressLocator?

Results 1 to 3 of 3
  1. #1 Anyone can help me with epicurus InetAddressLocator? 
    Owner of Spiritual-RSPS™

    Join Date
    Jul 2011
    Age
    28
    Posts
    101
    Thanks given
    6
    Thanks received
    11
    Rep Power
    0
    Compiler error:

    src\panel\Address.java error: package net.sf.javainetlocator does not exist
    import net.sf.javainetlocator.InetAddressLocator;
    ^
    src\panel\Address.java:4: error: package net.sf.javainetlocator does not exist
    import net.sf.javainetlocator.InetAddressLocatorException ;
    ^
    src\panel\Address.java:13: error: cannot find symbol
    this.countryOfOrigin = InetAddressLocator.getLocale(addr
    ess).getDisplayCountry();
    ^
    symbol: variable InetAddressLocator
    location: class Address
    src\panel\Address.java:14: error: cannot find symbol
    } catch (InetAddressLocatorException ex) {
    ^
    symbol: class InetAddressLocatorException
    location: class Address
    4 errors
    Appuyez sur une touche pour continuer...


    Address.java

    package panel;

    import net.sf.javainetlocator.InetAddressLocator;
    import net.sf.javainetlocator.InetAddressLocatorException ;

    public class Address {
    private String address;
    private String countryOfOrigin;

    public Address(String address) {
    this.address = address;
    try {
    this.countryOfOrigin = InetAddressLocator.getLocale(address).getDisplayCo untry();
    } catch (InetAddressLocatorException ex) {
    this.countryOfOrigin = "Unknown";
    }
    if (this.countryOfOrigin.equals(null) || this.countryOfOrigin.equals("**") || this.countryOfOrigin.equals("")) {
    this.countryOfOrigin = "Unknown";
    }
    }

    public String getAddress() {
    return address;
    }

    public String getCountryOfOrigin() {
    return countryOfOrigin;
    }
    }
    Reply With Quote  
     

  2. #2  
    Registered Member Whimzy's Avatar
    Join Date
    Sep 2013
    Age
    25
    Posts
    376
    Thanks given
    132
    Thanks received
    82
    Rep Power
    54
    You need to import,
    Code:
     net.sf.javainetlocator.InetAddressLocator;
    Make sure you are using a IDE.
    Reply With Quote  
     

  3. #3  
    Owner of Spiritual-RSPS™

    Join Date
    Jul 2011
    Age
    28
    Posts
    101
    Thanks given
    6
    Thanks received
    11
    Rep Power
    0
    It can't be fixed without using an IDE like eclipse?
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Money for anyone who can help me with this
    By thefunnypro in forum Help
    Replies: 6
    Last Post: 01-19-2010, 07:52 AM
  2. Replies: 4
    Last Post: 03-22-2009, 10:04 PM
  3. Replies: 0
    Last Post: 02-24-2009, 02:14 AM
  4. an easy problem im sure you can help me with
    By Jordzeh in forum Tutorials
    Replies: 3
    Last Post: 11-02-2007, 04:33 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •