How to choose NIC that connect to Internet

Hello,
I am developing VoIP application using Jain-SIP. it works nice in WinXP but when I try it on Ubuntu i got an exception :
"javax.Sip.SipException InvalidArgumentException"
after searching it on google, it tells that ubuntu return "127.0.1.1" when I execute InetAddress.getLocalhost().getHostAddress();
it was lead me to a forum that told a way how to get all interfaces physical and logical address, here is the code :
   for (Enumeration ifaces = NetworkInterface.getNetworkInterfaces(); ifaces.hasMoreElements();) {
                iface = (NetworkInterface) ifaces.nextElement();
                System.out.println("Interface :"+ iface.getDisplayName() );
            InetAddress ia = null;
            for(Enumeration ips = iface.getInetAddresses();ips.hasMoreElements();)
                ia = (InetAddress)ips.nextElement();
                System.out.println(ia.getCanonicalHostName()+":"+ia.getHostAddress());
            }it works beautifully. but....
my problem is, if one computer has 2 NIC, let say 1 Wireless connection and 1 ethernet connection, how can i choose one of those connection that connected to the internet ?
thanks.

banderaz wrote:
in case when an application start to run, or being installed, we need to configure "hosts" file in etc directory which need a super user priveleged, how can we do that ? Your app cannot solve all possible problems. At some point you must require that a system has certain things and make no guarantees if the system doesn't have it. One path you could take is to add a step to your installation instructions and require that the user verifies that the setup is correct.

Similar Messages

  • How to choose fields that will be displayed on CFL?

    Dear All,
    How to choose fields that will be displayed on CFL?
    Thank u

    hi ,
    please go through the following code
    Case SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST
                    Dim oDBs_Head As SAPbouiCOM.DBDataSource
                    Dim rs As SAPbobsCOM.Recordset = objMain.objCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                    Dim rs1 As SAPbobsCOM.Recordset = objMain.objCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                    Dim oCFL As SAPbouiCOM.ChooseFromList
                    Dim CFLEvent As SAPbouiCOM.IChooseFromListEvent = pVal
                    Dim CFL_Id As String
                    objForm = objMain.objApplication.Forms.Item(FormUID)
                    oDBs_Head = objForm.DataSources.DBDataSources.Item("@ZAM_CO1")
                    CFL_Id = CFLEvent.ChooseFromListUID
                    oCFL = objForm.ChooseFromLists.Item(CFL_Id)
                    Dim oDT As SAPbouiCOM.DataTable
                    oDT = CFLEvent.SelectedObjects
                   If oCFL.UniqueID = "CFL_3" Then
                            Try
                                oDBs_Head.SetValue("U_RStaff", 0, oDT.GetValue("firstName", 0) + " " + oDT.GetValue("lastName", 0))
                            Catch ex As Exception
                            End Try
                        End If
                   If oCFL.UniqueID = "CFL_4" Then
                            Try
                                oDBs_Head.SetValue("U_App1", 0, oDT.GetValue("firstName", 0) + " " + oDT.GetValue("lastName", 0))
                            Catch ex As Exception
                            End Try
                  End If

  • How to Parameter WRT54GS to connect to Internet through Livebox-2 ?

    I intend to connect a network built around the WRT54GS to Internet by passing through a second network who is already connected to Internet through the Orange Livebox-2 (French).
    I have a traditional home network with basic shares on the French Orange Livebox-2 and its WiFi.
    The computers runs XP - Pro .
    My ADSL access is normally through the Livebox-2
    (Range of addresses 192.168.1.xxx) and I run DHCP
    Working Group "WORKGROUP".
    It works without problem (Internet and VoIP telephony) except the Wifi of the Livebox which is known as poor (range and stability).
    I also manages a small "pedagogical workshop" for the school who visit my mill.
    This network is available to my young visitors based on a (tower) server containing the libraries and teaching materials and its printer. It’s XP - Pro machine. and to allow a maximum of two laptops be WiFi connected.
    The second network is built around the Linksys router (wich integrates no modem, simply a router).
    The WRT54GS router (rev 6) whose firmware is original Linksys up to date.
    I am setting the two Wi-Fi (Livebox 6 Cnl) and Cnl 4 on WRT54GS and different keys (this is manageable without difficulty).
    It has its server DHCP and Wi-Fi to connect their machine.
    What about the name of this second network group ? Currently “WORKGROUP” as well.
    I am setting a range different on the router WRT54GS (192.168.2.xxx) and enabled the DHCP.
    This "educational" network works perfectly when alone and separated from the "home" network and doesn’t get connected to Internet…
    I want to connect this router Linksys WRT54GS rev6 cascading through the Livebox-2.
    Share Internet via the Livebox-2 access.
    What about functionality?
    What is the connection to setup ?
    Should it be simple physical connection with a cable between the yellow ethernet port "2" of the Liveboxbox and the "Internet" connector of the Linksys router?
    Is this a good track to explore? I have searched extensively on the Internet but found proposals who are very old and refer to old Livebox... I did test and is not satisfactory...
    I have described as well as possible the needs and the config!
    It is the experts to speak now !
    I am available for further information.
    HOW CAN I ACHIEVE THE INTER CONNECTIVITY?

    From what I understand, you want to extend your internet connection - from the Orange Livebox-2  to your WRT54GS. You can actually do this by cascading the linksys router to your livebox. There are tow ways in cascading routers: LAN-LAN and LAN-WAN. For more information about cascading routers, you may refer to this link: http://www6.nohold.net/Cisco2/ukp.aspx?vw=1&docid=785463d9ecaf4cac84aed245b08d615f_3733.xml&pid=104&....

  • How can I print without connection to internet?

    My internet connection is very poor. It's often down.
    How can I print from mi mobile device to the printer that is wired connected?
    With iprint photo nothing was needed.

    Hmm this application on the android only requires that your Android device connects to your wifi maybe i can try to provide some clearer information and ill get some information from you as well.
    1. What type of printer do you have?
    2. What type of Android device do you have?
    3. The printer can either be wired or wirelessly connected to the network to use the ePrint home and biz application.
    Here are the steps that should apply.
    1. Turn your wifi on you Android device on and make sure its connected to the same network as the printer.
    2. Download and run the Hp ePrint home and biz application.
    3. Complete the registration in the application, it will ask for your personal email address and you will then receive an email with a pin to complete the registration.
    4. Next Either choose Photo Albums or Documents in the Application. Then select a document or photo to print, The next screen should give you a print preview, Select the down arrow and that will take you to the printer options which will have the supported printers in that list to print.
    Possible causes why your printer cannot be found include the following:
    The printer is not supported
    You are not connected to the  network
    You are connected to the wrong  network
    The printer is turned off
    The printer is not shared over the  network
    **Click the KUDOS star on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.
    (Although I am employed by HP, I am speaking for myself and not for HP)

  • How do i get printer connected to internet "server connection error"??

    NEW PHOTOSMART 5520 wifi all fine, prints fine on wifi, but it just keeps saying SERVER CONNECTION ERROR check internet connection- but i know the internet connection to the house is fine

    Hi there, take a look at this support document for a list of suggestions for the problem of establishing connectivity between the printer and the ePrint service (internet) http://h30434.www3.hp.com/t5/ePrint-Print-Apps-Mob​ile-Printing-and-ePrintCenter/ePrint-Apps-Connecti​...
    Work down through them in the order presented to isolate and resolve the problem. Post back with how you go on.
    Best
    If my reply helped you, feel free to click on the Kudos button (hover over the "thumbs up").
    If my reply solved your problem please click on the Accepted Solution button so other Forum users may benefit from viewing the post.
    I am an HP employee.

  • Mail detects no connection to internet when internet connection exists?

    Mail, at strange moments, brings up message that connection to internet is lost. Using the dialog box the pops up I find that the connection is fine, but everything (such as a transaction in progress) is lost. I am using an AT&T home gateway and Airport. When I connect using Ethernet hard wire, the problem does not occur. Something is amiss with Airport or Mail.

    HI,
    Try installing the v10.6.2 combo update available here.
    http://support.apple.com/kb/DL959
    It's ok to do this even if you are already running v10.6.2
    Carolyn

  • I cannot access my face time.When i do that I get a message that I cannot sign in and to check my internet connection. how can i fixed that?

    i cannot access my face time.When i do that I get a message that I cannot sign in and to check my internet connection. how can i fixed that?

    What version of iTunes are you using?  The latest is 10.6.3. In iTunes, choose Help -> About iTunes to check the version number. If it's lower than 10.6.3, download the latest version from here.
    B-rock

  • How can i find my ipod touch 5th g that has been stole (it does have icloud but it says that it needs internet connection) i dont know what to do now plz help

    How can i find my ipod touch 5th g that has been stole (it does have icloud but it says that it needs internet connection) i dont know what to do now plz help

    What To Do If Your iDevice or Computer Is Lost Or Stolen
    If your Mac, iPhone, iPod, iPod Touch, or iPad is lost or stolen what do you do? There are things you should do in advance - before you lose it or it's stolen - and some things to do after the fact. Here are some suggestions:
      1. Reporting a lost or stolen Apple product
      2. Find my lost iPod Touch
      3. AT&T, Sprint, and Verizon can block stolen phones/tablets
      4. What-To-Do-When-Iphone-Is-Stolen
      5. Lost or Stolen iPhone? Here’s What to do
      6. 6 Ways to Track and Recover Your Lost/Stolen iPhone
      7. Find My iPhone
    It pays to be proactive by following the advice on using Find My Phone before you lose your device:
      1. Find My iPhone
      2. Setup your iDevice on MobileMe
      3. OS X Lion- About Find My Mac
      4. How To Set Up Free Find Your iPhone (Even on Unsupported Devices)
    Third-party solutions for computers:
      1. VUWER 1.5.4
      2. Sneaky ******* 0.2.0
      3. Undercover 4.7
      4. LoJack for Laptops Premium Mac
      5. STEM 2.1
      6. MacPhoneHome 3.5

  • I have iPhoto 11 with Lion and when I try to post photos into MobileMe in Share I get the message that iPhoto is not connected to internet. Can anyone tell me how to connect iPhoto to internet?

    I have iPhoto 11 with Lion and when I try to post photos into MobileMe in Share I get the message that iPhoto is not connected to internet. Can anyone tell me how to connect iPhoto to internet?

    My solution, which is not much, is to restart iPhoto and it then connects to the Internet. This has been an ongoing unsolved problem.

  • How do I fix that my internet is not connecting, but the service is good

    The internet on my IMac desktop computer is not always connecting to the internet. The cable service is good because I have a PC next to it hooking up fine. Does anyone have any suggestions?

    Hello, if this is Airport or Wifi, try this...
    Make a New Location, Using network locations in Mac OS X ...
    http://support.apple.com/kb/HT2712
    10.5.x/10.6.x/10.7.x instructions...
    System Preferences>Network, top of window>Locations>Edit Locations, little plus icon, give it a name.
    System Preferences>Network, click on the little gear at the bottom next to the + & - icons, (unlock lock first if locked), choose Set Service Order.
    The interface that connects to the Internet should be dragged to the top of the list.
    Instead of joining your Network from the list, click the WiFi icon at the top, and click join other network. Fill in everything as needed.
    Also, turn off IPv6:
    System Preferences » Network » AirPort » TCP/IP tab » Configure IPv6
    Or whatever interface you connect with.

  • How to enable a disabled iPod that won't connect to internet

    trying to enable my disabled 5th generation iPod touch. I have tried connecting to iTunes on the computer, which I couldn't get it to do anything. I then tried using the "Find my iPhone" website and erased the iPod. However, I got a message that says "This iPod will be erased when it connects to the internet". How do I connect a disabled/locked iPod to the internet/wifi while it is waiting to be erased because it won't connect to internet/wifi?

    Disabled
    Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased.
    iOS: Forgot passcode or device disabled
    If recovery mode does not work try DFU mode.                        
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings        
    For how to restore:                                                             
    iTunes: Restoring iOS software
    To restore from backup see:
    iOS: Back up and restore your iOS device with iCloud or iTunes       
    If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
    You can redownload most iTunes purchases by:                         
    Downloading past purchases from the App Store, iBookstore, and iTunes Store        
    If problem what happens or does not happen and when in the instructions? When you successfully get the iPod in recovery mode and connect to computer iTunes should say it found an iPod in recovery mode.

  • My bluetooth seems to have stopped working in my car. Both phone and car audio says it is connected but nothing comes through car speaker.  I no longer have screen on iphone that says to choose audio source.  How do I get that screen back?

    My bluetooth seems to have stopped working in my car. Both phone and car audio says it is connected but nothing comes through car speaker.  I no longer have screen on iphone that says to choose audio source.  How do I get that screen back?

    Thanks, this was the clue I needed to figure it out.
    From Settings you can pull up Control Center.
    In Control Center you can enable "Access from within Apps" (also "Access from Lockscreen")
    Now when I'm playing music, I can swipe up from the bottom and a little control center window slides up. Neat - this is new since my old iPod. On this window, the name of the current Bluetooth connection appears. Tap on that, and a list of connected Bluetooth items appears. I just tap on the one I want to connect to and I am now playing through the speakers I want.
    Jimmy

  • How is it possible that when I do have a Wifi connection, I cannot connect to Safari or Google Chrome or anything else internet-related?

    How is it possible that when I do have a Wifi connection, I cannot connect to Safari or Google Chrome or anything else internet-related? Sometimes it does all work, but after a while Wifi is still there and I am not able to go to any website whatsoever.

    Your network preferences file may be damaged, that would explain why you can configure the computer and get online but then when the computer wakes from sleep and needs to restore the setting it cannot.
    Open the Library folder of your computer (not the Library in your user directory) and then find the Preferences folder. Now the problem for me is that I've not used Leopard forever so I'm not sure exactly where the file you want is or what it is called. In Mountain Lion it is called:
    com.apple.airport.preferences.plist
    and it is inside a folder called SystemConfiguration. But I can't remember if this has changed along the way or not. The easy thing to do is to go back to the Network Preferences pane again and make the change I directed above. Then you can look in the Preferences folder and sort by date modified to find the network preferences file that was just now modified. Move it to the desktop, restart your computer, reconfigure the WiFi again and see what happens.

  • How to install latest versions of flash player on computers that has no internet connection?

    How to install latest versions of flash player on computers that have no internet connection?
    When I goto 'http://get.adobe.com/flashplayer/' , it just keep displaying the following message without any option to download a standalone installer for offline installing:
    This content requires a newer version of the Flash Player. Please download and install the latest version of Flash Player from the Windows Update site before continuing.
    If you are using the Metro style browser, please confirm you have allowed updates to the Compatibility View list as follows: 
    Open IE on the Desktop
    From the Tools menu, click Compatibility View settings
    Check Download updated compatibility lists from Microsoft
    If you don't see the Tools menu, press and hold on the title bar, this will show the context menu, check the Menu bar.

    Hello,
    Welcome to Adobe Forums.
    As you don't have internet on computers, you can download offline installers for Flash Player 11.4 from here :
    For Internet Explorer :http://download.macromedia.com/pub/flashplayer/current/support/install_flash_player_ax.exe
    For Mozilla Firefox & Chrome : http://download.macromedia.com/pub/flashplayer/current/support/install_flash_player.exe
    Thanks,
    Vikram

  • When  iTunes is not connected  to internet it keeps on displaying a message that "iTunes couldn't connect to the store" whenever i open it. How to stop this message being displayed?

    When  iTunes is not connected  to internet it keeps on displaying a message that "iTunes couldn't connect to the store" whenever i open it. How to stop this message being displayed?

    guyz... do look into this...

Maybe you are looking for

  • TS4425 How can i do when the latest iCloud Terms & Condition does not pop up?

    When I go to photo stream on my appletv, it says "unable to sign in The icloud terms of service have changed. For more info, go to http://www.apple.com/support/icloud". I have tried this resolution on my iphone and ipad already: On your iOS device, t

  • Fidgity Hard Drive (2STF/1/4)

    A couple weeks ago I moved my iMac G5 to a new location. A week ago I started hearing some extra hard drive spinning that would stall the computer for a few seconds. Not a big deal so I figured I was overworking it and kept going. It has gotten worse

  • Canon 5d mark III does not recognize the Canon Speedlite 580EX II is connected

    When I choose External Speedlite control/ Flash function settings on the 5D. I get a dialogue that says This menu cannot be displayed. Incompatible flash or flash's power is turned off. Flash is on. If I take a photo, flash fire's. Pictures are ALWAY

  • Video file in camera but not in computer

    using a lumix lx7 p&s camera.  took several videos.  they playback ok in the camera.  however, when i insert the memory card into my mac the files are not there. all of the filenames for the jpegs are consecutive like p1010661, 62, 63.  the missiing

  • Pictures in interactive objects

    i have a map that field guys use i want to add a button so they can click on the button and it will pull up some pictures and a form associated with that location whats the best way to do this