File access from java


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 6 of 6

Thread: File access from java

  1. #1
    kk Guest

    File access from java


    I am trying to access a file in another machine from java using fileinput
    stream. It gives me access denied. How can i use fileinput or anyother command
    to access the file in another machine(in the network) using java.

    kk

  2. #2
    cool Guest

    Re: File access from java


    First of all find out the location of that file on other computer is shared.
    "kk" <kksash@aol.com> wrote:
    >
    >I am trying to access a file in another machine from java using fileinput
    >stream. It gives me access denied. How can i use fileinput or anyother command
    >to access the file in another machine(in the network) using java.
    >
    >kk



  3. #3
    kk Guest

    Re: File access from java


    "cool" <great@home.com> wrote:
    >
    >First of all find out the location of that file on other computer is shared.
    >"kk" <kksash@aol.com> wrote:
    >>
    >>I am trying to access a file in another machine from java using fileinput
    >>stream. It gives me access denied. How can i use fileinput or anyother

    command
    >>to access the file in another machine(in the network) using java.
    >>
    >>kk

    >Hi Cool,

    It is shared on that computer. But still it gives me access denied.T he directory
    has give full rights for everyone.So what is the reason for that. Can i use
    URL to open that same file. If so,how can i do that.

    kk


  4. #4
    cool Guest

    Re: File access from java


    URL url = new URL("http","IP address","C:/filename");
    URLConnection URLC = url.openConnection();
    InputStream filein = URLC.getInputStream();


  5. #5
    Paul Clapham Guest

    Re: File access from java

    Access denied. That means the operating system says you can't see the file.
    It's not a Java problem. Operating systems have a system of permissions
    that define who can read, write, or execute a file, and the file you are
    trying to access has its permissions set so that your user ID can't read it.
    Talk to your system administrator for more information.

    PC2

    "kk" <kksash@aol.com> wrote in message news:3adb2d16$1@news.devx.com...
    >
    > I am trying to access a file in another machine from java using fileinput
    > stream. It gives me access denied. How can i use fileinput or anyother

    command
    > to access the file in another machine(in the network) using java.
    >
    > kk




  6. #6
    Mark Guest

    Re: File access from java


    If you are accessing from and applet you will need to use the url technique.
    Unless you are willing to deal with policies.

    "Paul Clapham" <pclapham@core-mark.com> wrote:
    >Access denied. That means the operating system says you can't see the file.
    >It's not a Java problem. Operating systems have a system of permissions
    >that define who can read, write, or execute a file, and the file you are
    >trying to access has its permissions set so that your user ID can't read

    it.
    >Talk to your system administrator for more information.
    >
    >PC2
    >
    >"kk" <kksash@aol.com> wrote in message news:3adb2d16$1@news.devx.com...
    >>
    >> I am trying to access a file in another machine from java using fileinput
    >> stream. It gives me access denied. How can i use fileinput or anyother

    >command
    >> to access the file in another machine(in the network) using java.
    >>
    >> kk

    >
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center