Results 1 to 3 of 3
  1. #1
    kib_tse is offline Member
    Join Date
    Aug 2008
    Posts
    8
    Rep Power
    0

    Default remote file access problem

    hello duddies;

    I am trying to write/read to file which resides in another computer.
    i have tried this code:
    URL url = new URL("http","192.168.100.6","D:\\jes-1.6.1\\user.conf");
    URLConnection URLC = url.openConnection();
    InputStream filein = URLC.getInputStream();

    but the third line raised an exception. how can i resolve this problem.

    or can u send me another simple code to access the remote file.(a text file actually).(it is in drive D: folder= project file name=trial.txt).

    thanks in advance

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,306
    Rep Power
    25

    Default

    Does the server you are communicating with allow you to access any file anywhere on its computer? There might be restrictions.

    What exception do you get? Post the full text of the message.

  3. #3
    Juggler's Avatar
    Juggler is offline Member
    Join Date
    Jul 2008
    Location
    Chennai,India
    Posts
    16
    Rep Power
    0

    Default

    Try to Use this class it can help you to access the remote system

    Socket(String host, int port) This for Client System
    ServerSocket(int port) This for Server system

Similar Threads

  1. How to read a .EML file present on Remote Desktop?
    By anil@prokarma in forum New To Java
    Replies: 0
    Last Post: 06-12-2008, 02:05 PM
  2. Applet and remote file
    By Preethi in forum Java Applets
    Replies: 0
    Last Post: 06-03-2008, 05:54 AM
  3. File Access Through Servlets
    By bipinkrishna15 in forum Java Servlet
    Replies: 1
    Last Post: 05-27-2008, 10:58 AM
  4. how to load a file in remote machine
    By christina in forum New To Java
    Replies: 1
    Last Post: 08-06-2007, 09:33 PM
  5. variable access from another file
    By riadmazloum in forum AWT / Swing
    Replies: 1
    Last Post: 08-06-2007, 07:13 PM

Posting Permissions

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