Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

using io to write a file  RSS feed

 
Vedhas Pitkar
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,I am using java.io to copy a file from one m/c & writing it on another m/c.When I do it on 98 the code works fine but when i test it on NT it gives me an access denied error.I tried logging in as admin,givig full control rights to individual as well as to the entire drive.But the prob persists.Do help me out ,ranchers.
 
Asher Tarnopolski
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is there any chance you try to write into read-only folder?
 
Toby Davis
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I understand you correctly, you want to write a file to a different machine on your network (one which your web app does not reside locally). Windows NT/2000 uses SMB protocol for file sharing. Java has no official SMB support. There may be workarounds through JNI, but I found no docs on this, and I'm not a C++ programmer.
Started a forum on this here.
--
[ October 21, 2002: Message edited by: Toby Davis ]
 
Asher Tarnopolski
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh, didn't get your question properly ..
may be you can map a remote machine drive in your pc and write there like if it would be local?
 
Toby Davis
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That won't work. While you can list all "drives" on your machine, including mapped ones, you can't write or read files on mapped drives. That falls under SMB protocol.
 
Vedhas Pitkar
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried doing almost everything but am at a loss......
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!