Validate telnet connectivity

Validate telnet connectivity

How to validate telnet connectivity in my java code

View Answers

March 2, 2011 at 9:58 AM

urgent-please help "How to validate telnet connectivity in my java code"


March 8, 2011 at 3:17 PM

import java.io.*;
import java.net.*;
import java.util.*;
import java.util.TimerTask;
import org.apache.commons.net.telnet.TelnetClient;
class Connectivity extends TimerTask
{
    public static void main(String args[])
    {
        try
        {
            System.out.println("Please enter ip address");
            Scanner sc=new Scanner(System.in);
            String ip=sc.nextLine().trim();
            System.out.println("Please enter port number");
            TimerTask con  = new Connectivity();
            Scanner sc1=new Scanner(System.in);
            int port=sc1.nextInt();
            Timer timer = new Timer();
            timer.scheduleAtFixedRate(con,1,1000);
            Socket s1=new Socket(ip,port);
            InputStream is=s1.getInputStream();
            DataInputStream dis=new DataInputStream(is);
            if(dis!=null)
            {
                System.out.println("Connected with ip "+ip+" and port "+port);
            }
            else
            {
                System.out.println("Connection invalid");
            }

            dis.close();
            s1.close();

        }
        catch(Exception e)
        {
            System.out.println("Not Connected,Please enter proper input");

        }

    }

    @Override
    public void run() {
        // TODO Auto-generated method stub

    }
}









Related Tutorials/Questions & Answers:
Validate telnet connectivity
Validate telnet connectivity  How to validate telnet connectivity in my java code
code to validate username password of gmail and procedures to establish jdbc connectivity to store unread mails and retreive it..
code to validate username password of gmail and procedures to establish jdbc connectivity to store unread mails and retreive it..  Dear sir... 2)code in jsp to validate the username and password of my gmail mentioned above
Advertisements
code to validate username password of gmail and procedures to establish jdbc connectivity to store unread mails and retreive it..
code to validate username password of gmail and procedures to establish jdbc connectivity to store unread mails and retreive it..  Dear sir... 2)code in jsp to validate the username and password of my gmail mentioned above
code to validate username password of gmail and procedures to establish jdbc connectivity to store unread mails and retreive it..
code to validate username password of gmail and procedures to establish jdbc connectivity to store unread mails and retreive it..  Dear sir... 2)code in jsp to validate the username and password of my gmail mentioned above
code to validate username password of gmail and procedures to establish jdbc connectivity to store unread mails and retreive it..
code to validate username password of gmail and procedures to establish jdbc connectivity to store unread mails and retreive it..  Dear sir... 2)code in jsp to validate the username and password of my gmail mentioned above
code to validate username password of gmail and procedures to establish jdbc connectivity to store unread mails and retreive it..
code to validate username password of gmail and procedures to establish jdbc connectivity to store unread mails and retreive it..  Dear sir... 2)code in jsp to validate the username and password of my gmail mentioned above
ModuleNotFoundError: No module named 'dubbo_telnet'
ModuleNotFoundError: No module named 'dubbo_telnet'  Hi, My Python... 'dubbo_telnet' How to remove the ModuleNotFoundError: No module named 'dubbo_telnet' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'telnet_device'
ModuleNotFoundError: No module named 'telnet_device'  Hi, My... 'telnet_device' How to remove the ModuleNotFoundError: No module named 'telnet_device' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'dubbo_telnet'
ModuleNotFoundError: No module named 'dubbo_telnet'  Hi, My Python... 'dubbo_telnet' How to remove the ModuleNotFoundError: No module named 'dubbo_telnet' error? Thanks   Hi, In your python
Validate
Validate   hi all..im a beginner java and i need some help from u guys.. Its about validate. My HR request BF = 'brought forward', leave cannot apply date greater than 31/03 of particular year. So, if the user apply the date
ModuleNotFoundError: No module named 'python-telnet-vlc'
ModuleNotFoundError: No module named 'python-telnet-vlc'  Hi, My... named 'python-telnet-vlc' How to remove the ModuleNotFoundError: No module named 'python-telnet-vlc' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'python-telnet-vlc'
ModuleNotFoundError: No module named 'python-telnet-vlc'  Hi, My... named 'python-telnet-vlc' How to remove the ModuleNotFoundError: No module named 'python-telnet-vlc' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'python-telnet-vlc'
ModuleNotFoundError: No module named 'python-telnet-vlc'  Hi, My... named 'python-telnet-vlc' How to remove the ModuleNotFoundError: No module named 'python-telnet-vlc' error? Thanks   Hi, In your
How to transfer a file in java using SSH & Telnet
How to transfer a file in java using SSH & Telnet  How to transfer a file in java using SSH & Telnet
Remote file transfer in java using SSH & Telnet
Remote file transfer in java using SSH & Telnet  How to upload & download a file in java using SSH & Telnet
long validate
long validate  How to validate long type
database connectivity
database connectivity  describe java program steps in order to get connectivity to database along with example
database connectivity
database connectivity  how to create database connectivity between HTML and sql server2005
Java connectivity with MySQL
Java connectivity with MySQL  Java connectivity with MySQL
connectivity with php
connectivity with php  i have make one html form and doing connectivity with php database but when i click on submit button on html form display all coding in php form about connectivity instead of adding data, i used in html
JavaScript regex validate validate Zip.
JavaScript regex validate validate Zip.  JavaScript regex validate - how to validate Zip?   <html> <head> <title>Zip Code...; function validate() { var zip = document.getElementById("zip").value
java connectivity
java connectivity  hi........ Can u help me to do connectivity between java and weka??????? weka is a data mining tool which allows to do prediction, classification etc.... i want to do connectivity between weka and java can u
connectivity problem
connectivity problem  i am facing error in Class.for name statement... connectivity still i am facing this error* ================================oracle connectivity program============================ import java.sql.*; import
DB connectivity - EJB
DB connectivity  DB connectivity
connectivity with access
connectivity with access  how to connect with data base with access sheet. in my application form there is two JTextArea and Two JComboBox.   Is this Access database or excel sheet. Do you want to display the values
JDBC CONNECTIVITY
file in environment variable.   Java Mysql connectivity Other JDBC
connectivity with mysql
connectivity with mysql  if this code of roseindia doesnt work,then what to do..cant connect with my sql http://www.roseindia.net/tutorial/php/phpdatabase/Check-PHP-MySQL-Connectivity.html   Please visit the following
connectivity
connectivity
connectivity
VALIDATE
validate() and reset() methods
validate() and reset() methods   Describe validate() and reset() methods
validate select option jquery
validate select option jquery  How to Validate select option in JQuery
in connectivity - Hibernate
insertted  Hi friend, This is connectivity and hibernate configuration
JDBC CONNECTIVITY
connectivity Other JDBC Tutorials
connectivity step
connectivity step  sir.pls give me step one by one for connect the java program to oracle.   Follow these steps: 1) Import the following packages in your java file:*** import java.sql.*; import oracle.jdbc.driver.
ModuleNotFoundError: No module named 'connectivity'
ModuleNotFoundError: No module named 'connectivity'  Hi, My Python... 'connectivity' How to remove the ModuleNotFoundError: No module named 'connectivity' error? Thanks   Hi, In your python
validate bank account number
validate bank account number  how to validate bank account number in jsp
reset() and Validate() method
reset() and Validate() method   How does reset() and Validate() method struts work
validate() method of ActionForm work
validate() method of ActionForm work  How does validate() method of ActionForm work
validate parameter before using it
validate parameter before using it   How to validate the parameter before using it in JSP
validate bank account number
validate bank account number  how to validate bank account number in jsp
ModuleNotFoundError: No module named 'validate'
ModuleNotFoundError: No module named 'validate'  Hi, My Python... 'validate' How to remove the ModuleNotFoundError: No module named 'validate... to install padas library. You can install validate python with following
ModuleNotFoundError: No module named 'validate-it'
ModuleNotFoundError: No module named 'validate-it'  Hi, My Python... 'validate-it' How to remove the ModuleNotFoundError: No module named 'validate-it' error? Thanks   Hi, In your python environment
Validate <select> tag Items
Validate select tag Items  Hi, How to validate addition of two numbers of two different "select" tag items in JavaScript..? Thanks in advance
validate text field iPhone
validate text field iPhone  i got two different UITextfield in my iPhone application for user login. Just wondering how to validate
use of ActionMapping in validate()
use of ActionMapping in validate()  why do we pass actionmapping in validate(ActionMapping mapping,HttpServletRequest) even we don't use actionmapping in that method
Validate <select> tag Items
Validate select tag Items  Hi, How to validate addition of two numbers of two different "select" tag items in JavaScript..? Thanks in advance
sql connectivity through java
sql connectivity through java  i want an example for java db through sql connection. Thanks in advance
validate input php
validate input php  How to validate the input fields in PHP & HTML.   Hi, Please let's know many fields is to be validated. Then I will make an example for you.ADS_TO_REPLACE_1 Thanks

Ads