How to detect machine is on network, Please Help

Hello World,
I want to make button enable only if the laptop is connected to a network as soon as user disconnects, button should also get disable.
How can I detect that my machine is on network in Java application. And how should I
trap the event when it is disconnected or connected. Does system tray�s LAN icon by any means going provide me any help, if yes then how to use that.
Experts, please suggest, eagerly waiting for your reply,
Thanks and Regards,
Sachin Dare.

Sorry that I have to ask this, but your problem seems very Windows specific and I doubt it can be done in Java without the help of native code. What kind of application are you developing?

Similar Messages

  • How to detect machine is on network

    Hello World,
    I want to make button enable only if the laptop is connected to a network as soon as user disconnects, button should also get disable.
    How can I detect that my machine is on network in Java application. And how should I
    trap the event when it is disconnected or connected. Does system tray�s LAN icon by any means going provide me any help, if yes then how to use that.
    Experts, please suggest, eagerly waiting for your reply,
    Thanks and Regards,
    Sachin Dare.

    Both will work. If your computer is not connect to
    the network the ipconfig gives minimal details with an
    address like 0.0.0.0.
    Take you PC off the network and run ipconfig to see.
    what it does. I don't think this command will tell
    you the network has gone as quickly as polling a
    server but the ipconfig can give you a server to poll.
    e.g. the local DHCP/DNS/WINS serverThanks. Good to know.
    /Kaj

  • TS4605 Hi, I was working in WORD on a file containing huge data. My machine just hung up one day while working and now I seem to have lost the file how do I get it back.  Please HELP me.

    Hi, I was working in WORD on a file containing huge data. My machine just hung up one day while working and now I seem to have lost the file how do I get it back.  Please HELP me.

    Well, iCloud has nothing to do with this.
    Do you have the built-in backup function Time Machine running on your Mac?
    See: http://support.apple.com/kb/ht1427

  • ITunes wont open for me. it keeps saying "the Disc "untitled playlist" cannot be read. An unknown error occurred (-69)." don't know how to get it to work. Please help

    iTunes wont open for me. it keeps saying "the Disc "untitled playlist" cannot be read. An unknown error occurred (-69)." don't know how to get it to work. Please help

    It is likely a hardware failure
    http://support.apple.com/kb/TS3694?viewlocale=en_US#error1

  • I recently bought a dbx hardware compressor and am not quite sure how to use it in logic express 9. I hav a focusrite saffire 6 usb audio interface and am not dont how to use it in logic. Please help???

    I recently bought a dbx hardware compressor and am not quite sure how to use it in logic express 9. I hav a focusrite saffire 6 usb audio interface and am not dont how to use it in logic. Please help???

    MUYconfundido wrote:
    Pancenter,
    Thanks for the response, but I do not have a midi interface. I am using a midi to usb connector cable, thus bypassing the need for a Midi interface.
    The Mac reads the USB cable as a midi device, but not the keyboard that I am trying to use as a controller. I have tried it with my korg sp 300 and with my Nord Electro 2.
    Thoughts?
    Thanks,
    Tristan
    Tristan...
    This is what you have, correct?
    http://www.alesis.com/usbmidicable
    This from Alesis..
    "The AudioLink Series USB cable receives and outputs MIDI signal thanks to its internal interface. The USB-MIDI Cable connects plug-and-play to your Mac or PC for an all-in-one USB-MIDI solution."
    Notice, -internal interface-. What you have is a simple USB MIDI Interface. Most MIDI interfaces are USB.
    My point is (was), MIDI OUT of the Korg goes to the connector marked MIDI IN on the Alesis, those new to MIDI often get this wrong.
    pancenter-

  • I just updated my iPod touch and all my pictures are gone!!! How do I get them back? Please help!!!

    I just updated my iPod touch 4th generation to iOS 6.0.1 and all my pictures are gone!!! Everything else is there but my pictures! How do I get them back? Please help!!!

    If the photos were i your iPod's Camera Roll album (taken by or saved to the iPod you can:
    - If your PhotoStream is on you can get the last 30 days worth back. See that topic here:
    iOS: Importing personal photos and videos from iOS devices to your computer
    - Or you can restore from backup if you backed up when the photos were on the iPod.
    If the photos were synced to the iPod then you have to get them from where you got them the first time.

  • How to acess Database in I18N? Please help.

    How to acess Database in I18N? Please help.

    I have tried to overide the getContents() method of ListResourceBundle class but it returning an error at run time saying null Pointer exception.
    Here are the 2 codes resp.
    import java.util.*;
    public class Test1
         static String string ;
         public static void main(String args[])
    Locale locale = Locale.ENGLISH;
    ResourceBundle myResources =
    ResourceBundle.getBundle("MyResources", locale);
    string = myResources.getString("HelpKey");
    System.out.println(string);
    import java.util.*;
    import java.sql.*;
    public class MyResources extends ListResourceBundle
         static String[][] s3= null;
    String s6= null;
         String s7= null;
    public Object[][] getContents()
    Object[][] obj= (Object[][])dataBase();
              for(int i= 0; i< obj.length;++i){
                   for(int j = 0;j<obj.length;++j){
                        System.out.println("GGGGGGGG obj["+i+"]["+j+"]"+obj[i][j]);
              //s6=(String)obj[0][0];
         //     s6= obj[0][0].toString();
              //s7=obj[1][0].toString();
    Object[][] contents = { {s6},{s7}};
         return contents;
         private static String[][] dataBase()
         {           try
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   Connection con=DriverManager.getConnection("jdbc:odbc:DSN");
                   PreparedStatement stat= con.prepareStatement("Select Value,Key from Table1 where Key= ?");
                   String s1= "HelpKey";
                   stat.setString(1,s1);
                   ResultSet rs= stat.executeQuery();
                   while(rs.next())
                        String s2= (String)rs.getString("Key");
                        String s4= (String)rs.getString("Value");
                        String[][] s3 ={{s2},{s4}};
              catch(Exception e)
              e.printStackTrace();
         return s3;

  • HT1386 I have been trying to sync my iPhone and its not syncing. I've synced it before but now it has gone away. How can I re-sync it? Please help.

    I have been trying to sync my iPhone and its not syncing. I've synced it before but now it has gone away. How can I re-sync it? Please help.

    you did enable Music syncing in iTunes, yes?

  • How do I get PBS again?  Please help!!!

    I was able to get PBS when I first got Apple TV after putting in a code, but my cable company recently changed their channel lineup, and I can no longer get PBS on Apple TV.  I used to get PBS on channel 314 on my TV, but after speaking with my cable company, I now get it on channel 198, but I can't get anything at PBS on Apple TV. All I get when I go there is the "downloading circle" and nothing happens.  The cable company can't help, and I've written to PBS several times with no reply.  I thought maybe I could get a different code and start over, but I don't know how to do that.  Can anyone help, please.  PBS is one
    of the main reasons I bought Apple TV.  Thanks. 

    I don't know who vaszandrew is, but I (diamond2277) wrote How do I get PBS again?  Please help!!! 
    It got printed and I lost my page so I started over again, and the one above with my question showed             (dated May 2, 9:56 am) as if it were an answer to vasndrew.
    After I wrote, it occurred to me that maybe if I disconnect my Apple TV and reconnect it, I will get PBS, and it worked.  Now I don't need an answer.  Thanks to anyone who was going to answer!  I have to remember my usual answer to technical problems, UNPLUG, AND START AGAIN.

  • My ebay toolbar and the ebay logo that was in my system tray at the bottom have both disappeared when I installed FireFox??? How do I get them back? Please help.

    my ebay toolbar and the ebay logo that was in my system tray at the bottom have both disappeared when I installed FireFox??? How do I get them back? Please help.

    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Repair Database. If that doesn't help, then try again, this time using Rebuild Database.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. (In Library Manager it's the FIle -> Rebuild command)
    This will create an entirely new library. It will then copy (or try to) your photos and all the associated metadata and versions to this new Library, and arrange it as close as it can to what you had in the damaged Library. It does this based on information it finds in the iPhoto sharing mechanism - but that means that things not shared won't be there, so no slideshows, books or calendars, for instance - but it should get all your events, albums and keywords, faces and places back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. 
    Regards
    TD 

  • My iphone 4 screen turns into blue, and i can't do anything because my power button is broken. How to fix my iphone back? Please help me

    my iphone 4 screen turns into blue, and i can't do anything because my power button is broken. How to fix my iphone back? Please help me

    I am having the SAME exact problem! Except instead of lock button broken it's my home button so I can't do the whole "put in recovery mode" deal. My screen only says "tap the home button 3 times" and it has my screen locked until I hit the home button but since it is broken I can't get in my phone at all. I have all of my work info in my phone so I'm screwed and can't get any help. PLEASE let me know if you find a way around this...!!!
    Thanks!

  • TS3694 How do i fix error 3194? please help!

    How do i fix error 3194? please help!

    iOS of your iPhone could be modified / hacked. No one will be able to support you in this Forum.

  • My Ipod doesen't work when I try to connect it on my iTunes! How can I solve this problem? Please help me

    My Ipod doesen't work when I try to connect it on my iTunes! How can I solve this problem? Please help me

    Itunes doesen't see the ipod and it is all dark!

  • My sis. tryed to break my pass and now it says to conect to itunes  but i captured so many photos from the last sync  how to sync without deleting this photos please help

    my sis. tryed to break my pass and now it says to conect to itunes  but i captured so many photos from the last sync  how to sync without deleting this photos please help

    egzoni 123 wrote:
    my sis. tryed to break my pass and now it says to conect to itunes  but i captured so many photos from the last sync  how to sync without deleting this photos please help
    If you Restore using last computer you synced to the password will be removed and you can restore the last backup on your computer, which includes your camera roll.
    If you enabled Photo Stream in iCloud your photos are in Photo Stream.
    If you had installed one of the many apps that can upload photos to a photo sharing site and had used it you will have your photos.
    If you have done none of these things you are out of luck. The phone comes with many tools to preserve content, but you have to use them.

  • I lost my iPhone 3 days ago.. it wasn't connet to internet and I don't know how find it without the connection.. please help me and give me some advices!!

    I lost my iPhone 3 days ago.. it wasn't connet to internet and I don't know how find it without the connection.. please help me and give me some advices!!

    Change your passwords.

Maybe you are looking for

  • [SOLVED!] On USB drives, problems with non-English chars and HAL

    Hello, I am having a problem with non-English caracters (áãàçéẽê...) on files stored on my USB drive. On Windows they're created with the correct name. But on Linux the files have the non-English characteres replaced by '?' and are not accessible. If

  • Query text column of all_views table

    Hi Gurus, background : After a upgrade from 8.1.7 to 9.0.2 we found that some custom views have ',,' in them, but they are still showing in the 'VALID' status. Problem: In order to find all bad views I am trying to run something like SQL/> select vie

  • Error in drill down of  RRI-  Field Symbol not assigned

    Dear all, I am trying to call a SAP transaction on click of the jump target. I have created the jump target in the following way ..let me know if I am wrong .. Goto RBBS transaction . Specifed the sender report as 0SD_C01/0SD_C01_Q025 (Sales Volume A

  • Exporting tables to flat files

    Hi, Can I export tables to flat files(csv) using pl/sql. I mean suppose I have 2 tables 'student' and 'subject' and I want to create two flat files student.csv and subject.csv Please let me know, if I can do it using pl/sql for both the tables in one

  • SPA3102 questions

    Hey all, I just read the admin guide for the SPA 3102 but I wanna make sure I didn't misunderstand anything so, could someone confirm that I can do all the stuff below, and note I'm in the UK. 1. Register 1 voip provider (VA) for outgoing calls, 1 di