If ( windowsIsMacAddress(macAddressCandidate) ) this line give me error

hi master sir i try to
this link code http://forum.java.sun.com/thread.jspa?threadID=245711&forumID=4
see my code
private final static String getMacAddress() throws IOException {
          String os = System.getProperty("os.name");
          try {
               if(os.startsWith("Windows")) {
                    return windowsParseMacAddress(windowsRunIpConfigCommand());
               } else if(os.startsWith("Linux")) {
                    return linuxParseMacAddress(linuxRunIfConfigCommand());
               } else {
                    throw new IOException("unknown operating system: " + os);
          } catch(ParseException ex) {
               ex.printStackTrace();
               throw new IOException(ex.getMessage());
private final static String windowsParseMacAddress(String ipConfigResponse) throws ParseException {
          String localHost = null;
          try {
               localHost = InetAddress.getLocalHost().getHostAddress();
          } catch(java.net.UnknownHostException ex) {
               ex.printStackTrace();
               throw new ParseException(ex.getMessage(), 0);
          StringTokenizer tokenizer = new StringTokenizer(ipConfigResponse, "\n");
          String lastMacAddress = null;
          while(tokenizer.hasMoreTokens()) {
               String line = tokenizer.nextToken().trim();
               // see if line contains IP address
               if(line.endsWith(localHost) && lastMacAddress != null) {
                    return lastMacAddress;
               // see if line contains MAC address
               int macAddressPosition = line.indexOf(":");
               if(macAddressPosition <= 0) continue;
               String macAddressCandidate = line.substring(macAddressPosition + 1).trim();
               if(windowsIsMacAddress(macAddressCandidate)) {
                    lastMacAddress = macAddressCandidate;
                    continue;
          ParseException ex = new ParseException("cannot read MAC address from [" + ipConfigResponse + "]", 0);
          ex.printStackTrace();
          throw ex;
private final static String windowsRunIpConfigCommand() throws IOException {
          Process p = Runtime.getRuntime().exec("ipconfig /all");
          InputStream stdoutStream = new BufferedInputStream(p.getInputStream());
          StringBuffer buffer= new StringBuffer();
          for (;;) {
               int c = stdoutStream.read();
               if (c == -1) break;
               buffer.append((char)c);
          String outputText = buffer.toString();
          stdoutStream.close();
          return outputText;
public final static void main(String[] args) {
          try {
               System.out.println("Network infos");
               System.out.println(" Operating System: " + System.getProperty("os.name"));
               System.out.println(" IP/Localhost: " + InetAddress.getLocalHost().getHostAddress());
               System.out.println(" MAC Address: " + getMacAddress());
          } catch(Throwable t) {
               t.printStackTrace();
but sir only this line give me eror
if ( windowsIsMacAddress(macAddressCandidate) )
symbol : method windowsIsMacAddress(java.lang.String)
location: class webapplication42.Page1
if(windowsIsMacAddress(macAddressCandidate)) {
1 error
please give me idea how i get mac address
thank's
aamir

Complete step 17 (2 steps after you paste the code)
17. Right-click in the source and choose Fix Imports from the pop-up menu.
I suggest that you complete the following 2 tutorials before you try to do the advanced ones.
http://developers.sun.com/jscreator/learning/tutorials/2/jscintro.html
http://developers.sun.com/jscreator/learning/tutorials/2/helloweb.html

Similar Messages

  • This line give me error Map fillParams = new HashMap(); for calling ireport

    hi master
    sir i flow this link step by step
    http://developers.sun.com/jscreator/learning/tutorials/2/reports.html
    when i us this step
    Double-click the View Report button to display the Java source for the viewReportBtn_action method.
    Add the following code shown in bold to the body of the viewReportBtn_action method.
    Code Sample 5: viewReportBtn_action Method
    public String viewReportBtn_action() {
    // Free up the rowset resources
    tripDataProvider.close();
    then this line give me error
    Map fillParams = new HashMap();
    in out put windows give me this error
    C:\Documents and Settings\Administrator\My Documents\Creator\Projects\TravelReport\src\travelreport\Page1.java:383: cannot find symbol
    symbol : class Map
    location: class travelreport.Page1
    Map fillParams = new HashMap();
    please give me error how solve this error
    thank's
    aamir

    Complete step 17 (2 steps after you paste the code)
    17. Right-click in the source and choose Fix Imports from the pop-up menu.
    I suggest that you complete the following 2 tutorials before you try to do the advanced ones.
    http://developers.sun.com/jscreator/learning/tutorials/2/jscintro.html
    http://developers.sun.com/jscreator/learning/tutorials/2/helloweb.html

  • This line give me error ExternalContext econtext = getExternalContext();

    sir i try to create pdf with using
    ireport and jasper
    i past mfa.jasper and mfajrxml in wen-ing/reports folder
    i see this link
    http://developers.sun.com/jscreator/learning/tutorials/2/reports.html
    i try to call mfa.jasper directly by using inputstream
    when i put this line system give me error
    please give me idea which class i import and how i use inputstream
    thank's
    aamir

    Complete step 17 (2 steps after you paste the code)
    17. Right-click in the source and choose Fix Imports from the pop-up menu.
    I suggest that you complete the following 2 tutorials before you try to do the advanced ones.
    http://developers.sun.com/jscreator/learning/tutorials/2/jscintro.html
    http://developers.sun.com/jscreator/learning/tutorials/2/helloweb.html

  • TextField1.setText("fahimaamir"); this code give me error in netbeans 6.1

    hi master
    sir i use netbean 6.1
    i have one textfield and one button in page
    when i use this code in button
    public String button1_action() {
    textField1=("fahimaamir");
    return null;
    that give me error line in
    textField1=("fahimaamir"); this code
    when i deploy that show this error
    F:\BACKUP\WebApplication8\src\java\webapplication8\Page1.java:142: cannot find symbol
    symbol : variable textField1
    location: class webapplication8.Page1
    textField1.setText("sjflskjf");
    1 error
    F:\BACKUP\WebApplication8\nbproject\build-impl.xml:392: The following error occurred while executing this line:
    F:\BACKUP\WebApplication8\nbproject\build-impl.xml:213: Compile failed; see the compiler error output for details.
    BUILD FAILED (total time: 1 second)
    please see this error and give me idea how i give value to textfield
    thank you
    aamir

    hi!
    Since Netbeans 6.1 the IDE doesn't add Bindings Attributes for placed components like textFields...
    When you place an textField or any other component you have to right click on it an choose: Add Binding Attribute
    Then the component is known in the source code.
    Greetings,
    Remi
    Edited by: remifreiwald on Jun 25, 2008 11:00 AM

  • See my code for geting the datasource that give me error

    sir i use under blow code for geting datasource
    no error in datasource but when use datasource object that give me errr
    Connection conn = null ;
    // the following should be in a try-catch...
    javax.naming.Context ctx = new javax.naming.InitialContext() ;
    DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/Travel") ;
    conn = ds.getConnection() ;
    JasperReport jasperReport = JasperCompileManager.compileReport ("f:\ireport\fahim.jrxml","G",conn); ?(this line give me error )
    JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport,new HashMap(),obj);
    please give me idea how i get ireport JasperReport viewer
    thank's
    aamir

    I found and easier way to do it and wrote it up here: http://developers.sun.com/jscreator/learning/tutorials/2/reports.html

  • RE: [Adobe Reader] when i open pdf file it open all the pages but some pages give error massage (there was error processing a page,there was a problem reading this document 110) but if i open this page which give me error with google chrome it's work ? i

    HelloThank's for your helpsI hope this document is helpfulBest Regards,
    Date: Sun, 22 Jun 2014 17:10:17 -0700
    From: [email protected]
    To: [email protected]
    Subject:  when i open pdf file it open all the pages but some pages give error massage (there was error processing a page,there was a problem reading this document 110) but if i open this page which give me error with google chrome it's work ? if you can help me th
        when i open pdf file it open all the pages but some pages give error massage (there was error processing a page,there was a problem reading this document 110) but if i open this page which give me error with google chrome it's work ? if you can help m
        created by Anoop9178 in Adobe Reader - View the full discussion
    Hi,
    Would it be possible for you to share the document?
    Regards,
    Anoop
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at https://forums.adobe.com/message/6485431#6485431
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
         To unsubscribe from this thread, please visit the message page at . In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Adobe Reader by email or at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

    thank's for reply and your help
    i did the step's that you told me but  i still have the same problem
                                     i have the latest v.11.0.7
    i
    i disable the protected mode

  • Hello all .. i have a big problem in my ipad version 5.1.1 that is when i connect the ipad with my computer the i tunes give me this message ( itunes couldnt connect to this ipad .an unknown error occurred (0xE8000012).) how i can solve this problem pleas

    hello all .. i have a big problem in my ipad version 5.1.1 that is when i connect the ipad with my computer the i tunes give me this message ( itunes couldnt connect to this ipad .an unknown error occurred (0xE8000012).) how i can solve this problem please
    and this is an pic for the problem

    There is some troubleshooting for 0xE8 error codes on this page : http://support.apple.com/kb/TS3221 - you could see if anything on that page fixes it

  • When i open pdf file it open all the pages but some pages give error massage (there was error processing a page,there was a problem reading this document 110) but if i open this page which give me error with google chrome it's work ? if you can help me th

    when i open pdf file it open all the pages but some pages give error massage (there was error processing a page,there was a problem reading this document 110) but if i open this page which give me error with google chrome it's work ?
    if you can help me thank's
    [email address removed by host]

    thank's for reply and your help
    i did the step's that you told me but  i still have the same problem
                                     i have the latest v.11.0.7
    i
    i disable the protected mode

  • I have a new laptop and I am trying to download CS3. The site on adobe gives an error message and the one I tried from this forum downloaded CS3 extended, so my serial number does not work. Does anyone have any suggestions. Regards Vicki

    Hi,
    I have a new laptop and I am trying to download CS3. The site on adobe gives an error message and the one I tried from this forum downloaded CS3 extended, so my serial number does not work. Does anyone have any suggestions. Regards Vicki

    The trial is always extended. The serial number you enter determines whether it runs as standard or extended.
    I'm getting through fine with that link, so it must be a browser issue or some such thing. Try another browser.

  • Every time I download a new app or update an old one it doesn't work. It gives an error message saying it is unable to download the application. I have 2 choices. Retry or done. Retry doesn't work so I press done. What can I do to fix this?

    Every time I download a new app or update an old one it doesn't work. It gives an error message saying it is unable to download the application. I have 2 choices. Retry or done. Retry doesn't work so I press done. What can I do to fix this? Someone please help!

    Try using Google's DNS instead of the one your IPS is providing.
    - To change on the iPod go to Settings>wifi and change the DNS to 8.8.8.8
    - For the computer see:
    Public DNS — Google Developers
    - Did anything happen to your router right before this started? Maybe the router is blocking the port used.

  • TS2529 Im am using Windows 7 ,I log onto to itunes and connect my Iphone.When my iphone tries to sync it gives an error message "itunes has stopped working" - this only happens when i connect my iphone and it tries to sync - help please

    Im am using Windows 7 ,I log onto to itunes and connect my Iphone.When my iphone tries to sync it gives an error message "itunes has stopped working" - this only happens when i connect my iphone and it tries to sync - help please

    Many thanks.
    With those symptoms, I'd try the following document:
    Apple software on Windows: May see performance issues and blank iTunes Store
    (If there's a SpeedBit LSP showing up in Autoruns, it's usually best to just uninstall your SpeedBit Video Accelerator.)

  • Since uploading Maverick, my Microsoft apps give an error message "(the app) quit unexpectedly.  Click Reopen to open the application again."  However, this does nothing but renew this window.  What to do?

    Since uploading Maverick, all of my Microsoft apps give an error message "(name of the app) quit unexpectedly.  Click Reopen to open the application again."  However, this does nothing but renew this window.  I have to click on the "OK" button to get rid of the error message.  What to do?

    Very Important, how much Free Space is on your Hard Drive first of all? Click on the Macintosh HD on the Desktop, then do a Get Info on it.
    Could be many things, we should start with this...
    "Try Disk Utility
    1. Insert the Mac OS X Install disc, then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu at top of the screen. (In Mac OS X 10.4 or later, you must select your language first.)
    *Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.*
    3. Click the First Aid tab.
    4. Select your Mac OS X volume.
    5. Click Repair Disk, (not Repair Permissions). Disk Utility checks and repairs the disk."
    http://docs.info.apple.com/article.html?artnum=106214
    Then try a Safe Boot, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot when it completes.
    (Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive.)
    If perchance you can't find your install Disc, at least try it from the Safe Boot part onward.
    Do they launch OK while in Safe Mode?

  • When I try to start my macbook it gives an error of Please restart your computer, but when i do this i get the same error.

    When I try to start my macbook it gives an error of Please restart your computer, but when i do this i get the same error. This occured after my macbook pro shut down (because of low battery) while it was installing some updates. Please Help?

    Try reinstalling OS X. What version did you have installed? If it's Snow Leopard do this:
    Reinstall OS X without erasing the drive
    Do the following:
    1. Repair the Hard Drive and Permissions
    Boot from your Snow Leopard Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Utilities menu. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer.
    If DU reports errors it cannot fix, then you will need Disk Warrior and/or Tech Tool Pro to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.
    2. Reinstall Snow Leopard
    If the drive is OK then quit DU and return to the installer.  Proceed with reinstalling OS X.  Note that the Snow Leopard installer will not erase your drive or disturb your files.  After installing a fresh copy of OS X the installer will move your Home folder, third-party applications, support items, and network preferences into the newly installed system.
    Download and install the Combo Updater for the version you prefer from support.apple.com/downloads/.

  • TS1424 All of my books in iBooks have the following message:  "this page has the following errors:  error on line 1 at column 1 document is empty error on line 1 : encoding error..,...". Any advice?

    All of my books in iBooks have the following message:  "this page has the following errors:  error on line 1 at column 1 document is empty error on line 1 : encoding error..,...". Any advice?

    I have the same problem. I've tried to restart my Ipad and downloaded the book again several times but nothing has changed. There aren't any reviews on the book with that problem and I've got the latest version of iBook so I don't know what else I can do to get the book which I've paid for. Does anyone have another idea what I could do? (maybe one of the above might help you, Paul)
    Thanks

  • HT1491 how can i buy gem in clash of clans?it give me error like this"the buying is not complited"

    how can i buy gem in clash of clans?it give me error like this"the buying is not complited"

    If you are also getting a message to contact iTunes Support then you can do so via this link and ask them for help (on these forums we won't know why the message is appearing) : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

Maybe you are looking for

  • I am receiving an error message every time I try to save files using QuickOffice Pro.  Any advice on what I might be doing wrong?

    I am receiving an error message that it is unable to save my file everytime I try to save a file using QuickOffice Pro on my iPad.  It seems like I must have missed a setting or something someplace but I can't figure it out.  Any advice?  Thanks!

  • Cannot do a full text search on pdf or Microsoft office Documents.

    I am using Oracle Content Server 10gR3 Apart from the standard components and other components, I have InBound refinery Support and Oracle text Search Components enabled. I get the following error when I check in a pdf or a Microsoft office document.

  • I can't print from Widows 7

    When I try to print from Firefox it just sits in the print que. I have updated all of my drivers and plugins and nothing has helped. I just got a gateway running Windows 7 64 bit. Am I have a HP J6450 Printer. Thank You

  • Table will not show mutiple price values

    I am unable to go beyond 152 for my property price. I want it to say 152000. This is what I put into Oracle: SELECT * FROM Property; PROPERTY_NUM PROPERTY_ADDRESS PROPERTY_CITY PROPERTY_STATE PROPERTY_ZIP PROPERTY_PRICE PROPERTY_TYPE 0001 245 Benner

  • Could not connect to the RAC node

    Dear all, I've setup an Oracle RAC on 2 nodes(Windows Server 2008) with iSCSI as storage. Currently I'm trying to verify the availibility of RAC using the following situation: Reboot the first node and and at the same time connect to the RAC using th