| | |
DNS: RouteThrough , " RT" in java networking programming
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Dec 2004
Posts: 3
Reputation:
Solved Threads: 0
IS THERE ANY PARALLEL FUNTCION FOR DIG IN JAVA.
"RouteThrough", "RT", TYPE_RT:: I tried this in java but i am getting this error at
run time "ERROR - DNS Error: Unknown resource record type 'RT' "
It performs DNS lookups and displays the answers that are returned from the name
server(s) that were queried.
IS THERE ANY OTHER WAY TO INTEROGATE ROOT DNS SERVERS.
THANKS
"RouteThrough", "RT", TYPE_RT:: I tried this in java but i am getting this error at
run time "ERROR - DNS Error: Unknown resource record type 'RT' "
It performs DNS lookups and displays the answers that are returned from the name
server(s) that were queried.
IS THERE ANY OTHER WAY TO INTEROGATE ROOT DNS SERVERS.
THANKS
•
•
Join Date: Dec 2004
Posts: 3
Reputation:
Solved Threads: 0
i am trying to interrogate root DNS servers, using " TRACERT " but after going to first hop i am getting " Request timed out "
please help.
code is as follows
import java.net.*;
import java.io.*;
class Whois extends Thread
{
public String traceCmdUnix = "tracert -h 10 ;
private StringBuffer result = null;
private void pingCmd (String command)
{
result = new StringBuffer ();
try {
Process p;
p = Runtime.getRuntime().exec(command);
readResult(p.getInputStream());
p.destroy();
}
catch (Exception e) {
e.printStackTrace();
}
}
private void readResult (InputStream in)
{
String line = null;
BufferedReader br = new BufferedReader(new InputStreamReader(in));
try {
while (!this.isInterrupted() &&
(line = br.readLine()) != null)
{
//this.doResultLine(line+"\n");
System.out.println(line);
}
}
catch (IOException e) {
e.printStackTrace();
}
finally {
try {
br.close();
}
catch (IOException e) {
}
}
if (this.isInterrupted())
System.out.println("*** Canceld ***");
}
public static void main (String args[]) throws Exception
{
Whois MyObj = new Whois();
MyObj.traceCmdUnix = MyObj.traceCmdUnix + " " + "www.yahoo.com" ;
MyObj.pingCmd(MyObj.traceCmdUnix);
}
}
OUTPUT:----->
C:\>tracert -d 5 -w 600 www.yahoo.com
Tracing route to www.yahoo.akadns.net [68.142.226.39]
over a maximum of 30 hops:
1 <10 ms <10 ms <10 ms 10.129.210.100
2 * * * Request timed out.
3 * * * Request timed out.
4 * * * Request timed out.
5 * * * Request timed out.
6 * * * Request timed out.
7 * * * Request timed out.
8 * * * Request timed out.
9 * * * Request timed out.
10 * * * Request timed out.
plz help
Thanks
please help.

code is as follows
import java.net.*;
import java.io.*;
class Whois extends Thread
{
public String traceCmdUnix = "tracert -h 10 ;
private StringBuffer result = null;
private void pingCmd (String command)
{
result = new StringBuffer ();
try {
Process p;
p = Runtime.getRuntime().exec(command);
readResult(p.getInputStream());
p.destroy();
}
catch (Exception e) {
e.printStackTrace();
}
}
private void readResult (InputStream in)
{
String line = null;
BufferedReader br = new BufferedReader(new InputStreamReader(in));
try {
while (!this.isInterrupted() &&
(line = br.readLine()) != null)
{
//this.doResultLine(line+"\n");
System.out.println(line);
}
}
catch (IOException e) {
e.printStackTrace();
}
finally {
try {
br.close();
}
catch (IOException e) {
}
}
if (this.isInterrupted())
System.out.println("*** Canceld ***");
}
public static void main (String args[]) throws Exception
{
Whois MyObj = new Whois();
MyObj.traceCmdUnix = MyObj.traceCmdUnix + " " + "www.yahoo.com" ;
MyObj.pingCmd(MyObj.traceCmdUnix);
}
}
OUTPUT:----->
C:\>tracert -d 5 -w 600 www.yahoo.com
Tracing route to www.yahoo.akadns.net [68.142.226.39]
over a maximum of 30 hops:
1 <10 ms <10 ms <10 ms 10.129.210.100
2 * * * Request timed out.
3 * * * Request timed out.
4 * * * Request timed out.
5 * * * Request timed out.
6 * * * Request timed out.
7 * * * Request timed out.
8 * * * Request timed out.
9 * * * Request timed out.
10 * * * Request timed out.
plz help
Thanks
![]() |
Similar Threads
- Starting "Java" [Java tutorials / resources / faq] (Java)
- Java Tutorials (Java)
- Java networking (Java)
- DNS: TRACERT , Java Network Programming (Java)
- What does it take to be a "power linux user"? (Getting Started and Choosing a Distro)
- help to set up "Sun Java™ System Application Server PE 8" for web application (Java)
Other Threads in the Java Forum
- Previous Thread: Calendar Help
- Next Thread: DNS: TRACERT , Java Network Programming
| Thread Tools | Search this Thread |
add android api applet application applications array arrays automation bank binary bluetooth chat class classes clear client code codesnippet component converter database development dice digit eclipse equation error event exception formatingtextintooltipjava fractal functiontesting game givemetehcodez graphics gui health html hyper ide idea image infinite input int integer j2me java javame javaprojects jni jpanel julia linux list loop main map method methods mobile myregfun mysql netbeans newbie nonstatic openjavafx parameter pearl print problem program programming project recursion repositories scanner screen scrollbar server set size sms sort sorting spamblocker sql sqlserver state storm string superclass swing text-file thread threads time tree windows





