Results 1 to 2 of 2
  1. #1
    mnementh64 is offline Member
    Join Date
    Sep 2009
    Rep Power

    Default Cannot perform a PING

    Hi to all !

    I use JSVC to execute a class (within a jar file) which only performs a Ping on a host with :
    Boolean status = InetAddress.getByName(hostAddr).isReachable(timeou t);

    Under Linux systems, the isReachable() function can only use ICMP protocol if the jar file has the Suid privilege (chmod +s) and has to be executed as root user, otherwise it will perform the PING with TCP protocol on port 7.

    After all, I am sure that :
    - JSVC has the Suid privilege
    - the jar file also has the same
    - jsvc is executed as root
    ... and my Ping don't work with ICMP (I know it because my firewalls block all TCP / 7 requests).

    And if I launch as root the jar with java -jar myJar ... it's ok (in ICMP).

    Does anybodyy has any idea to help me ?

    Best regards

    Sylvain Caillet

  2. #2
    emystx is offline Member
    Join Date
    Sep 2009
    Rep Power


    I had computer issues before and pestering my computer savvy friends made me a pest. A friend highly recommended It was a great relief to finally solve my computer issues.

Similar Threads

  1. Replies: 10
    Last Post: 05-06-2009, 10:30 PM
  2. Replies: 6
    Last Post: 04-20-2009, 02:46 AM
  3. Perform one action at a time
    By Melki in forum AWT / Swing
    Replies: 6
    Last Post: 12-08-2008, 08:29 AM
  4. How to perform some event to button click
    By eva in forum AWT / Swing
    Replies: 2
    Last Post: 01-16-2008, 01:27 AM
  5. ping cmd
    By kishi in forum Advanced Java
    Replies: 2
    Last Post: 11-14-2007, 04:27 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts