How do i ping a specific ip address using java

I'm basically writing a client/server chat program that uses TCP/IP as the protocol of communication. When the client application starts running, it is suppose to ping the network and determine if the server is running on a specified ip address. I've written both the server and client application, but i'm facing the one problem of pinging the network using the client application.
I hope somebody comes up with a suggestion....

http://www.rgagnon.com/javadetails/java-0093.html

Similar Messages

  • WRT54GL V 1.1 : how to reserve IP for specific MAC address using DHCP

    My !free! made in China router have this functionality. And yet I have been banging my head with this new reasonably expensive wireless router from Linksys. Anyway I lug my notebook around. I need my home router to be able to automatically configure notebook IP address using DHCP. At the same time I need the ip given by home router through DHCP to be the same IP all the time. So "static" ip is not the solution. Alternative "static" ip is also not a solution. Anything with the word "static" in it is not a solution. I know about third party firmware (wrt or tomato) and I know WRT54GL can be flashed with this third party firware. But I'm not going to void my warranty. This will be my last option but not the solution that I seek. I would like to know how to reserve ip for specific mac address using DHCP for WRT54GL V1.1. If this version have no way to make such configuration, I would like to know if there is official firmware upgrade that address this. Thanks in advance!

    LDK-Anc wrote:
    Tonik - For the life of me, I cannot find DHCP Reservation on the WRT300N. I'm currently configuring one and it would be really useful if I could fine it. Maybe LinkSys calls it something else, but I don't really see anything resembling it. Help!
    Maybe these could help. (Images extracted from the User Guide)
    Setup tab: Basic Setup
    DHCP Reservation
    Message Edited by denman_v2 on 03-25-2008 05:11 PM

  • How to read a data from USB port using JAVA

    hi all,
    i need to know how to read a data from USB port using java. any API are available for java ?.........please give your valuable ideas !!!!!!!!!
    Advance Thanks!!

    You can do this. Please use this link
    [http://www.google.co.in/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=uHu&q=java+read+data+from+usb+port&btnG=Search&meta=&aq=f&oq=]
    What research did you do of your own? Have you done some testing application and tried yourself??

  • How to create a table in the file using java code.?

    HI,
    I should export the data from the view objects to a word document. I have done that but I should
    display the data in the form of a table.
    Kindly come up with the necessary information on how to create a table in the file using java.
    Thanks,
    Phani

    Hi, Thank you for responding to my query.
    The below are the details of my code.
    DCBindingContainer dcBindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding StudentDetailsContent =
    (DCIteratorBinding)dcBindings.get("StudentView1Iterator");
    OutputStreamWriter w = new OutputStreamWriter(outputStream, "UTF-8");
    Row currentRow =
    StudentDetailsContent.getRowSetIterator().first();
    Object a[]= currentRow.getAttributeValues();
    int i;
    for(i=0 ;i<=a.length;i++){
    w.write(a.toString());
    w.write(" ");
    w.flush();
    I am usning this coding to achieve the task of exporting data to file.
    I need to display this information in the table that is where I need help from you people.
    Thanks,

  • How to Append two  word documents into single  using   java

    How to Append two word documents into single using java
    we tried this but it's not append the one word document to other
    source code:public class AppendTwoWordFiles {
         public static void main(String []arg)throws IOException
              FileInputStream fi=null;
              FileOutputStream fo=null;
              try {
                   System.out.println("Enter the source file name u want to append");
                   BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
                   File f1=new File(br.readLine().toString());
                   System.out.println("Enter the Destination file name ");
                   File f2=new File(br.readLine().toString());
                   fi = new FileInputStream(f1);
                   fo = new FileOutputStream(f2,true);
                   byte b[]=new byte[2];
                   while((fi.read(b))!=-1);
              fo.write(b);
    System.out.println("Successfully append the file");
              } catch (FileNotFoundException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              finally{
              fi.close();
              fo.close();
    plz reply me quickly ,,,what can i follow

    Use this code ..
    and give the path of the both file like this.....
    source file ---- C:/workspace/Practice/src/com/moksha/ws/test/practice.text
    destination file ---- C:/workspace/City/src/com/moksha/ws/test/practice1.text
    import java.io.*;
    public class AppendTwoWordFiles {
         public static void main(String[] arg) throws IOException {
              FileInputStream fi = null;
              FileOutputStream fo = null;
              try {
                   System.out.println("Enter the source file name u want to append");
                   BufferedReader br = new BufferedReader(new InputStreamReader(
                             System.in));
                   File f1 = new File(br.readLine().toString());
                   System.out.println("Enter the Destination file name ");
                   File f2 = new File(br.readLine().toString());
                   fi = new FileInputStream(f1);
                   fo = new FileOutputStream(f2, true);
                   byte b[] = new byte[2];
                   int len = 0;
                   while ((len = fi.read(b)) > 0) {
                        fo.write(b, 0, len);
                   System.out.println("Successfully append the file");
              } catch (FileNotFoundException e) {
                   e.printStackTrace();
              } catch (IOException e) {
                   e.printStackTrace();
              } finally {
                   fi.close();
                   fo.close();
    }

  • How does one know whether or not they use "Java applets"?

    The support doc for the recent Java update (Update 8, for Snow Leopard), entitled "About Java for Mac OS X 10.6 Update 8," advises the following:
    If you do not use Java applets, it is recommended that you disable the Java web plug-in in your web browser.
    How does one know whether or not they use "Java applets"?
    Thanks.
    URL:  http://support.apple.com/kb/HT5243

    K.S. wrote:
    dymar wrote:
    Also, how would I know that a missing applet was causing some feature(s) not to work in a situation where no error mesage was returned?
    Sometimes you have to dig to find out: http://earthnow.usgs.gov/earthnow_app.html
    doesn't tell you directly, but it is mentioned in the FAQ that Java is required. If the content is appropriate, you can always ask here.
    Thanks.  According to that webpage, my "Java is out of date."  When an error message like that is returned, I guess it's clear that "it's a Java problem."  Presumably, one would then just go to java.com and download the applet if he/she wanted to view the webpage.
    I was wondering more about situation when unexplained problems that involved missing Java applets weren't noted in error messages.
    But maybe I'm worrying about something that doesn't really need to be worried about.

  • How can we get requester's user id using java code

    Hi,
    How can we get requester's user id using java code?
    eg: If i had logged in as xelsysadm and request a resource for user uid101 on the userid field it should display uid101 and not xelsysadm.
    also,
    I have a resoure "A" which on revoking should also revoke resources B and C. How can it be done. Resource A, B, and C are 3 different resource objects.
    ==Thanks,
    doki

    Ok, so there is a way, but it's not available during submission. You can use the findRequests api. From the result set, get the "Requests.Consolidated Data Value" value. In this information, you will get an xml formatted data. It provides the list of users on the request on the left side after submission. After the request is completed, this value is available. Upon completion, you could get the request information, get this value, and parse the information for user ids.
    In the same adapter, use the following API:
    formIntf.setObjectFormData(objInstanceKey, formHash)
    The formHash is a hashtable containing the field name on your object form, and the values you wish to populate it with. You could create a textarea box on your object form and populate the userids for who the request is for.
    However, this makes absolutely 0 sense. When you get a request, the list of userids are listed right there on the request.
    -Kevin

  • How to send sms to mobile from tomcatserver using java code?

    Hi,
    Could you please let me know that,
    How to send sms to mobile from tomcatserver using java code? Please provide the code snippet.
    Thanks in advance.

    Yes, but something needs to send that message. You can't just take an arbitrary computer and send an SMS, it does not have the hardware to do that.
    So either you have a mobile through which you do that or more likely - you use some sort of online service to do it. Whatever choice you make will determine what code you will have to write to get it done. Nobody is going to deliver the code to you, that's your job. It is also your job to figure out what service you are going to use.

  • How do I block a specific IP address?

    How do I block my iMac from looking at a specific IP address? I can't find the answer to this anywhere...
    My iMac is connected to the net via a NETGEAR ADSL router and if I look at the NETGEAR settings using Safari to interigate the NETGEAR unit, I can only set parameters for site blocking by using certain keywords. I want to block access to a specific IP address and NETGEAR doesn't have the capabilities of doing this.
    Any suggestions?
    Cheers!
    Chris
    Intel chip iMac 17 inch, 2 Gig RAM   Mac OS X (10.4.7)   Early 2006 iMac

    chrisasha,
    You could either manually modify your hosts file or you could use the shareware program Hostal if you're not comfortable using Terminal.
    -Wayne

  • How to send mail to multiple mail address using mail pkg?

    Hi All,
    How to send a mail to multiple mail addresses using Mail package. I tried by giving multiple mail addresses separated by semicolon(as well as comma) to the To field of the Mail Package structure, it gives Invalid Address error in Message Monitoring. But if i give a single mail address it works. How to address multiple email addresses.
    Regards,
    Sundar

    HI,
    With semicolon for mulitple email ids it worked for me (long back). Anyway cross check with this aprt of SAP help-
    http://help.sap.com/saphelp_nw04/helpdata/en/6b/4493404f673028e10000000a1550b0/content.htm
    Regards,
    Moorthy

  • How to pass payable or ordering vendor addresses using basic type CREMAS01

    Hi there!
    have a query on how to feed payable and ordering vendor address details to an existing basis type CREMAS01. multiple payable vendors can be existed under one ordering vendor . Currently both OV, PV are being populated at purchase org level and thus both details available under segment E1WYT3M of E1LFM1M. however E1WYT3M doesn't have address related info.
    We would like to send all payable vendor address details associate for an ordering vendor via existing CREMAS01 Idoc. Can someone please let me know what are all technical ways to fill address in existing Idoc type? if possible, please share any document to achieve this req. I'm also surfing web at same time.
    Thanks in advance.

    Thanks for the reply.
    The blog talks about specifying the username token policy or specifying the credentials using username and password properties.
    What I need to do is pass something like this :
    <Authorization>Basic Yw377jbkjbaiudjuo3u=</Authorization>
    where,
    Yw377jbkjbaiudjuo3u= represents Base64Encoded combination of username and password separated by colon(:) [username:password]
    I have set the bpelx:inputHeaderVariable=Authorization under Invoke of MyBPEL.bpel and have used Assign activity to pass Basic Yw377jbkjbaiudjuo3u= as the Authorization value, but it is not working.
    In addition, I also tried setting the  <property name="oracle.webservices.http.headers">Authorization</property> in composite.xml for the reference service but it doesn't work.
    Can you please help me in figuring out what am I missing? Is there any patch that has to be applied for this to work. I am using SOA 11.1.1.5
    Please help

  • How to get MAC address using java code

    hi friends
    please write me, How can I get MAC Address of local machine using java code.I don't want to use JNI.
    Please reply me. Its urgent for me
    Thanks in advance
    US

    You have several ways under *nix
    ifconfig -a | grep HWwill output something like
    eth0      Lien encap:Ethernet  HWaddr 00:11:FF:74:FF:B4combined with Runtime.getRuntime().exec("")and Process.getInputStream()you should be able to read it easilly.
    Under Windows (and Linux of course) try jpcap (http://sourceforge.net/projects/jpcap)
    You can also use jnative as a generic tool (http://sourceforge.net/projects/jnative)
    --Marc (http://jnative.sf.net)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How do I separate my e mail addresses using Mac Mail in Mavericks?

    Hi All, moving from my beloved Snow Leopard to Mavericks has not been good.
    In Mac Mail I have a mix of POP (my main accounts) and IMAP (G Mail) accounts.
    Since installing Mavericks the e mail addresses are now all lumped together (as on an iPad) and I do not want this!
    Please advise how I can go back to separate addresses listed as before? Help! I choose to prioritise my e mails and a whole lot at once is so not where I want to be! (And it does not look as stylish as before!)
    Thank You!

    Answered!  Ok, I am trudging my way through Mavericks and it seems I have my separate Mail boxes back. 
    I have to say that I do not like the look of Mavericks. It was so clean, simple and smart before. It feels kind of messy but maybe I need lots more time to get used to it .But so far, a bit sad I've upgraded to Mavericks. I did it first on my Mac Book before doing so on my iMac and at the mo I am not going to!

  • How to launch Jar file in Mac Os using java code??

    can anyone tell me how can i launch another jar file in my apllication using java code.

    define "launch".
    - You want to run a new java program in a separate process? (see Runtime.exec())
    - You want to run a method in a specific class in the jar? (add jar to application classpath and then simply instantiate the class and call the method)

  • How can i encrypt an ddecrypt a string using java

    hai,
    can anybody know how to encrypt and decrypt a string using java..
    please if anybody help me with a small example and with code
    thanks
    ravi chandra

    hi,
    of course there are better ways to crypt your code, but the following 2 functions do their job....
    as far as i know java has an own api for crypting stuff.
    private String GetEncryptedString(String aCryptedString)
    String result = "";
    String str = aCryptedString;
    int[] asciiArray = new int[str.length()];
    for(int i = 0; i < asciiArray.length; i++)
    asciiArray[i] = (int)str.charAt(i);
    char tempChar = (char)(asciiArray[i]+3);
    result = result+tempChar;
    return result;
    private String GetDecryptedString(String aString)
    String result = "";
    String str = aString;
    int[] asciiArray = new int[str.length()];
    for(int i = 0; i < asciiArray.length; i++)
    asciiArray[i] = (int)str.charAt(i);
    char tempChar = (char)(asciiArray[i]-3);
    result = result+tempChar;
    return result;
    andi

Maybe you are looking for

  • Videos not displayed in Videos app

    Back when I updated to iOS 6 some videos disappeared from the Videos app. Now I realize that the videos show in the movies section under "On this iPad" in iTunes when I connect, which I don't do very often. I can actually play the videos in iTunes bu

  • How to create facebook event in Xcode 4.6

    Hi All, I am doing a Facebook application in ios sdk 6 using Xcode 4.6. I have to create a facebook event. I am in pretty confusion that How to create facebook event in my code. Can anybody help me.. Thanks in advance. Regards, R.V.Lakshmi kanth

  • Need link to attachment from a list.

    I've got a user who has a very large SharePoint list, to which she is attaching files (normally, I'd recommend a Document Library, but that's its own story).  She wants to be able to have a direct link to the attached file as a list column.  Much to

  • New regions still attached to original source file!

    I'm sure I'm overlooking something here: I import a 3 minute audio file. I cut in a few places using my scissor tool and create copies of these newly cut regions. I move these new regions to other tracks and rename them. I open one of these regions i

  • Changing default email account in iPhone mail

    Hello, I have initially setup my Mail with my "primary" .mac email address, but the problem is that any email I reply to on my iPhone uses that email account & alias, even if the email was sent to another email alias provided my my .mac account. This