File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Sockets and Internet Protocols and the fly likes URL & Networking Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "URL & Networking" Watch "URL & Networking" New topic

URL & Networking


Joined: Feb 15, 2001
Posts: 11
Hi everybody,
can somebody help me.
I'va a problem regarding accessing my local machine's hardisk through Sockets.What should be the URL,Port & protocol.
Should the port be unique to a machine or any Port should work.
I've tried
InetAddress inet = new InetAddress ("file:///c:"+File.seprator+"FILENAME");
It is not working. Iam checking for working of Sockets & URLs
using my hard disk and not the web.
Anybody having a solution or suggestion please help me.
bill bozeman
Ranch Hand

Joined: Jun 30, 2000
Posts: 1070
I am going to move this to the Socket/Networking forum
gautham kasinath
Ranch Hand

Joined: Dec 01, 2000
Posts: 583
have u tried the http://localhost/filename??
it works if u r running a webserver on u r m/c
but if u want a file then consider file:///filename it shud work..
Gautham Kasinath

"In the country of the blind, the one eyed man is the King"
Gautham Kasinath CV at :
maateen ashraf
Ranch Hand

Joined: Jan 08, 2001
Posts: 122
u should have to have a server running at specific port
so that can listen requests from any client through socket...
I agree. Here's the link:
subject: URL & Networking
It's not a secret anymore!