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
Printable View
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
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
"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
URL url = new URL("http","IP address","C:/filename");
URLConnection URLC = url.openConnection();
InputStream filein = URLC.getInputStream();
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
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
>
>