aspose file tools
The moose likes Sockets and Internet Protocols and the fly likes What's wrong here.. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply Bookmark "What Watch "What New topic
Author

What's wrong here..

Mahajan Bhupendra
Ranch Hand

Joined: Dec 01, 2000
Posts: 118
hi just now i have started the java.net
and the very first program give me an error
my program is ..

it's giving me error..
computer1/200.200.200.38
Exception in thread "main" java.net.UnknownHostException: www.rediff.com
at java.net.InetAddress.getAllByName0(Unknown Source)
at java.net.InetAddress.getAllByName0(Unknown Source)
at java.net.InetAddress.getByName(Unknown Source)
at InetAddressTest.main(InetAddressTest.java:7)

i think it is beacause in our office we are having LAN and server is having NT4.0 with service pack 6..
is the problem beacuse of LAN or anything wrong in a program itself..


<B>Bhupendra Mahajan</B>
Mahajan Bhupendra
Ranch Hand

Joined: Dec 01, 2000
Posts: 118
Hey one day has passed please give me answer..
ping203
Greenhorn

Joined: Jan 10, 2002
Posts: 5
Hi,
The error message tells you what is wrong.
Exception in thread "main" java.net.UnknownHostException: www.rediff.com.
Your network does not know what "www.rediff.com" is(Unknown host). It is like you type some address and your browser returns you a Page Not Found message.
btw, your code works fine on my machine and I got the output:
www.rediff.com/64.41.191.70
Ping
Mahajan Bhupendra
Ranch Hand

Joined: Dec 01, 2000
Posts: 118
we use internet frequently as we have a common connection to server and wingate(software that distributes internet to LAN clients)...
so if i type rediff.com in by browser i didn't get any error but the web site...
what should be the problem???
Laudney Ren
Ranch Hand

Joined: Jan 06, 2002
Posts: 111
I'm just wondering, if main() can throw any exception. Maybe you can't change the signature. It is and always should be: public static void main(String args[])


" Veni, vidi, vici "<br />" I came, I saw, I conquered "
 
IntelliJ Java IDE
 
subject: What's wrong here..
 
Threads others viewed
Getting Exception in main method..
connecting to the web by a JAVA program
Can't even run a "Hello World" program
Failure launching application... access denied
connecting to the web by a JAVA program
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture