Initiate a dial-up connection or detect whether I am connected to the net

I want to initiate a dial-up connection from my java program and also to detect whether I am connected to the internet or not.

well I am developing a proxy server and I want to add
a feature of dial-up demand that detects the current
connection status and if not connected to the net then
call the dial-up dialers in dial-up networking folder
and then connects to the internetI'd say it works like I wrote earlier:
Keep yourself in the proxy-server the connections-status.
If your proxy-server runs on a normal PC, it should be enough to try to connect to the internet.
But do you need control over multiple dial-up dialers etc., this probably isn't enough.
If I can find the time, I'll look into it.
Maybe direct access to the modem is also an option.
That depends on the modem of course and then you probably also need additional scripting. I guess that's not what you're looking for, but if you need info on that, it's probably also an option to look at a wvdial-script on Linux for connection to the internet. It might also be a problem if you have multiple channels for connecting onto the internet (cable,phone,ASDL etc.)

Similar Messages

  • Error connecting to database - java.sql.SQLException: Io exception: The Net

    Hello friends,
    I know this question has been asked in a lot of other threads; but my problem is quite unique and that's why I'm starting a new thread...
    When I try to access an Oracle 10g database through a Servlet code using a JDBC thin driver (both Tomcat and the database are running on Solaris 9), I get the following error:
    "Error connecting to database - java.sql.SQLException: Io exception: The Network Adapter could not establish the connection"
    However, there is another application running on the same server using the same database server (only the actual databases being used differ) and it is able to access the database without any issues. Both of these are absolutely similar applications and I couldn't think of any reasons why one would work and the other wouldn't. I thought they might be conflicting each other and tried running only the problematic application. But even then, I get the same error.
    I know this might not be too relevant but to provide you some more information on the environment, the applications are running on separate Tomcat instances on the same server and they are connected to an Apache web server through Mod jk.
    Any help in solving this problem is greatly appreciated!
    Thanks!
    Regards,
    Yogaesh

    Yogaesh wrote:
    The 'application' that works is also a Tomcat application... It's exactly same as the problematic application in terms of the configuration and stuff... As for the typo errors, I copied the config info and pasted it... So pretty much it should be the same. And to add an additional note, I'm able to connect to the database from my localhost... I mean if I run the problematic application from localhost (without Apache and directly hitting Tomcat) I'm able to access the screens...
    The second part of that (localhost) usually isn't all that useful. You know it is a connection failure so that means the code is running and technically successfully (since connection failure is a legitimate runtime error.)
    You know it isn't a firewall issue because it connects from another app in tomcat. So it must be a configuration issue.
    So something like one of the following.
    1. It isn't the same (we already know this but this particular item means that it is not in fact exactly the same because you deliberately or accidently modified it.)
    2. It isn't pulling the right config. Maybe you aren't packaging it, maybe it is buffered on the server and it is using that rather than what you think it is.
    3. Java code is referring to the wrong name.
    Do this, change the configuration so it points to a server that does not exist. Repack, redeploy. If the error is the same (no diff) then you know that it is not running the code that you think it is. If it does change then you know that it can only be 1.

  • Detecting whether the internet is present

    How can i detect whether an internet connection is active?

    You could try opening a connection to reliable websites.
    (Try a couple just to be sure.)
    import java.net.URL;
    import java.net.MalformedURLException;
    import java.net.SocketException;
    import java.io.IOException;
    import java.io.InputStream;
    public class InternetConnectedTest {
        public static void main(String[] args)
            boolean connected = false;
            try
                URL url = new URL("http://www.google.com");
                InputStream in = url.openStream();
                connected = true;
                in.close();
            } catch (MalformedURLException e)
                System.out.println("Programmer error, url is malformed. Can't determine connection status.");
                return;
            } catch (SocketException e)
                connected = false; //redundant, just to show what's going on
            } catch (IOException e)
                //an IO problem indicates there is something to have an IO problem with,
                //so most likely we are connected
                connected = true;
            System.out.println("We are " +
                    (connected  ? "connected"  : "not connected" )
    }

  • Getting error - Cannot connect to internet; please check network connection

    I can connect using wifi without any issues and surf the net. Connections seems to be fine and my friends who are on the same service have no issues.  Any ideas on cause?

    They said all their networks are up and working. They walked me thru some steps (powering off). Turning off Data, turn it back on, turn of LTE then turn it on.  It was working fine until 8 pm last night and no new downloads so I left them scratching their heads. Worse case I will head down to the Apple Store this evening and have one of the guru's look at it but willing to bet they will reload the operating system.

  • How do I detect whether a publishing object is connected to the datasocket server or not?

    I have 2 vis which communicate via datasocket. The behaviour of the second vi depends on whether the first vi is running or not, and both vis can be started and stopped independently of each other. I need vi 2 to be able to detect whether vi 1 is running or not. Simple, I thought, I'll have a boolean in vi 1 called Running which is set to True when the vi is running and False when it shuts down. I'll publish that vi to datasocket and have a matching boolean in vi 2 which subscribes to it.
    It doesn't work, because as soon as vi 1 stops, Running disconnects and the matching boolean in vi 2 misses the fact that it got set to False before it disconnected, and just gets stuck in the True state.
    So it seems to me there should be a "Is object connected?" vi or function somewhere, but I can't find it.
    Is there another way to detect whether a vi is running or not? Preferably without using shared globals as I find that quite ugly, in fact I've switched to using datasocket from using shared globals because the latter just seemed like really ugly programming.
    Note: I will have several variants of vi 1 with different names, so I can't just try to open a reference to the vi. That's why I wanted to use a datasocket object; all the versions of vi 1 can have a boolean called Running.

    I found a solution. The subscribing boolean in vi 2 is now in its own little loop that executes every 50ms in parallel to the main program loop.
    In vi 1 there is a delay of 500ms between the publishing boolean being set to false and the vi stopping.
    That way the subscriber boolean has plenty of opportunity to read the False state of the publisher.

  • Adobe AIR - Inconsistencies in detecting whether Adobe AIR runtime is installed

    Hello Flex community,
    I am having issues with detecting whether Adobe AIR is installed  using the following process: http://livedocs.adobe.com/flex/3/html/help.html?content=distributing_apps_3.html
    Having installed Adobe AIR 1.5, we are at times getting a value of  not installed from the getStatus() function of the air.swf located at  http://airdownload.adobe.com/air/browserapi/air.swf
    Has anyone else faced this issue before? If so, does anyone have any  steps to resolve it?
    Thanks!
    Mauricio

    After doing some more research on the issue, I have found other users encountering the same issue we are:
    http://groups.google.com/group/air-tight/browse_thread/thread/706716c29caf0254
    http://www.flexdeveloper.eu/forums/adobe-air/air-swf%27s-getstatus-method-mistakenly-retur ns-%27available%27-when-air-is-installed/
    http://forums.adobe.com/thread/435935
    In the second thread, it says:
    “My issue seems to be specifically related to the use of "Silent Install". My client has a distribution license for the AIR runtime and is bundling the AIR installer with their installer. When Silent Install is used to install the AIR Runtime, Adobe's air.swf reports that the runtime is not installed. This happens until the user initiates an air app, at which point air.swf is able to detect the runtime installation.””
    This seems to suggest there is a bug with the Silent Installer or with the air.swf getStatus function. I tried the steps above and was able to recreated and resolve the issue. Does anyone else know of a different workaround?

  • Can I detect if something is connected to the vga port?

    Is there a software solution to detect if something is connected to the vga port of my laptop? I want to write a script that can automatically choose if to run X in dual head or single head mode.

    Yes - Airplay will work whether the Express is wired or wireless - wired is the most reliable way to go - note however that if you wire the Express, you would use the "create a wireless network" option and use the same name and password as your main network

  • Can somebody explain to me how I can detect that an internet connection exists (VB)?

    Can somebody explain to me how I can detect that an internet connection exists (VB)?
    Peter Goossens

    There is no reliable way. Better test whether you can go to where you want to go. And be prepared to support proxies, even the complex ones that require authentication. 
    System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable reports your local connectivity regardless of whether one of your connected networks has Internet access.
    Microsoft's Network Awareness API (the one used in control panel\network and sharing center) use a connection test to a web site setup by Microsoft. But your customers could be behind cooperative firewalls that make this test unusable even when Internet
    access is available though other means (e.g. via a local proxy server). If you want to connect to your own web site, then you can skip that and just connect to your web site instead. Even if you were able to connect to Microsoft's web site there is no guarantee
    your web site would be accessible in the same network.
    Visual C++ MVP

  • Not detecting tv display when connected with Apple Mini-DVI to Video Adapte

    I am connecting my macbook to my older tv using a Apple Mini-DVI to Video Adapter to an RCA (yellow video prong) and then into the tv. The red and white audio prongs hang loose, not hooked into anything on both ends. When I go into Displays there is no option for mirroring displays. I hit 'detect displays' but nothing happens. The Apple Mini-DVI to Video Adapter is brand new, just ordered it from apple. And I use the RCA cord all the time with other machines into my tv and it works fine.
    Any help is really appreciated. Thanks!

    Which generation MacBook do you have because at some point Apple dropped support for that adapter. Here is a link to a list of Apple adapters and compatible computer models:
    http://support.apple.com/kb/HT3235

  • My MacBook Air 13' (2013) will occasionally start the fan at full blast, not connect to any wifi or detect any wifi, and will remove the battery icon from my menu bad as well as tell me there is no battery connected. How do I fix this?

    My MacBook Air 13' (2013) will occasionally start the fan at full blast, not connect to any wifi or detect any wifi, and will remove the battery icon from my menu bad as well as tell me there is no battery connected. How do I fix this? I have restarted my computer multiple times, **** it down, and ran a diagnostic test to tell me nothing is wrong and my computer is not running any applications. There is no reason for the fan to be on full blast! when I try to set the option to show my battery icon in the menu bar, it will automatically uncheck. How do I fix all of this?

    Have you tried SMC and PRAM resets?
    http://support.apple.com/kb/HT3964
    http://support.apple.com/kb/ht1379
    Ciao.

  • My iphone4s does not turn on,when I connect to power ,it shows the message "connect to itunes" but when I connect to iTunes,my pc does not detect my phone,so iTunes does not detect my iPhone.

    My iphone4s does not turn on,when I connect to power ,it shows the message "connect to itunes" but when I connect to iTunes,my pc does not detect my phone,so iTunes does not detect my iPhone.

    Are you running the most recent version of iTunes for Windows on your PC?  You may be running an older version that is incompatible with the 4s.
    Hope this helps

  • How do I establish a dial-up connection in Labview to FTP files (I have the internet connectivity toolkit)?

    I'm writing an application that will automatically update files on a server, using the internet toolkit's FTP vi's. It works fine with a LAN, but I'm not sure how to establish a dial-up connection via a telephone modem.
    Ultimately, I'd like the program to dial-up, connect, ftp files, then hang up. So far I have used AT commands through the serial compatiblity vi's to dial up and logon to a local internet provider. The provider then spat out an IP number and an MTU number (1524), followed by periodic spurts of garbabe.
    Any help in getting to the next level would be greatly appreciated.
    Thank you,
    Tom

    Tom,
    You CANNOT dial-up to the ISP using the Internet Developers Toolkit. The toolkit assumes you already have a valid TCP/IP connection. However, many web browsers such as Netscape and Internet Explorer have auto-dialing options that will start dial-up networking automatically when you launch your browser. The only trouble is that the auto-dial wizards can require the user to push buttons, but there is a Shareware program called DUNCE which will take care of the button pushes for you in the auto-dial wizards so the user does not have to intervene in the dial-up process. You can recommend to the customer that the lauch their browser from LV and then have the browser configured for auto-dial and that should take care of the problem. I did not actually try this o
    ut myself, but in theory it should work.
    Zvezdana S.
    National Instruments

  • HT1688 my iphone is disabled and says pls connect to itunes but when i connected to itunes it would say cant detect iphone because it needs to be unlocked. i dont have access to unlock it. its disabled. pls help

    my iphone is disabled. it prompted me to connect to itunes but when i connected to itunes... it will just say cant detect iphone because it needs to unlocked. how can i unlocked if theres no way to unlock it? pls advise. ty!

    Hey aldrichangel!
    Here is an article that has a few suggestions for you that will help you unlock your phone:
    iOS: Forgotten passcode or device disabled after entering wrong passcode
    http://support.apple.com/kb/ht1212
    Take care, and thanks for visiting the Apple Support Communities.
    -Braden

  • Iphone 4s not getting detected in macbook after connecting via usb cable, also photos taken in iPhone not showing in macbook pro

    iphone 4s not getting detected in macbook after connecting via usb cable, also photos taken in iPhone not showing in macbook pro    

    Thanks. I realises that i will hv to go to iphoto to see the photo. Its now working !!!!!

  • Infinite loop - A stale JDBC connection was detected in the connection pool

    Hello.
    I have a simple JSP (no servlets) application with a single Fastlane Reader style view object to back it up. I'm deploying my application under OC4J 10g 9.0.4 using BC4J 9.0.3.11.50 (JDev 9.0.3.3) on RHEL 3.0, j2sdk1.4.2_03.
    I run with -Djbo.debugoutput=console
    Every so often, intermittently, and totally unpredictably, I see this on stdout for OC4J:
    03/12/23 07:42:07 [33326] A stale JDBC connection was detected in the connection pool
    03/12/23 07:42:07 [33327] Creating a new pool resource
    03/12/23 07:42:07 [33328] Trying connection/2: url='jdbc:oracle:thin:@somedb:1521:somedbsid' info='{user=someuser, password=somepass, dll=ocijdbc9, protocol=thin}' ...
    This message occurs over and over ultimately resulting in hundreds upon thousands of failed connections to the database. I have to forcibly restart OC4J to stop it.
    The weird thing about it is that it seems to only start doing this on one system (which is our internal deployment site); it works fine under an OC4J running in IDE or on a preproduction machine.
    Has anyone experienced this before - or at the very least, can clue me in on getting BC4J to be a little more verbose on the connection failure?
    Thanks and Happy Holidays,
    Sean

    Hi did you find an answer?
    if so, could you post it here?
    thanks

Maybe you are looking for