• Post Reply Bookmark Topic Watch Topic
  • New Topic

JFileChooser  RSS feed

 
Ivana Miki
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to use JFileChooser to save file to another computer in the same LAN but that computer requires authentication, so JFileChooser just opens directory of my computer.

Recommendations??

p.s. starting the application, user was already asked to authenticate for that computer
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's outside of the scope of JFileChooser. Either the drive is visible to the user (meaning, its file root is accessible, in which case JFileChooser can be used to navigate to it), or it isn't - in which case there's nothing JFileChooser can do about it.
 
Ivana Miki
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:That's outside of the scope of JFileChooser. Either the drive is visible to the user (meaning, its file root is accessible, in which case JFileChooser can be used to navigate to it), or it isn't - in which case there's nothing JFileChooser can do about it.


so what do you recommend me to do? how do i save a file to that computer, using what?
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it an SMB server? If so, you can use the jCIFS library.
 
Ivana Miki
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:Is it an SMB server? If so, you can use the jCIFS library.


unfortunately i do not know what is that ...
usually i get files from that computer over WinSCP (SFTP), but in my application, user has to save a file to some directory on that computer.
user already provides username and password but now i do not know how to choose destination file
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Google knows how to find jCIFS. It's a Java library for accessing SMB shares. But you haven't said whether that drive *is* an SMB drive. Your last post sounds like it's accessible via SFTP; if so, a library like JSch can be used to access it.

Neither library is trivial to use, so you will have to do some reading, learning, developing and testing ahead of you. But it's not rocket science, either.
 
Ivana Miki
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:Google knows how to find jCIFS. It's a Java library for accessing SMB shares. But you haven't said whether that drive *is* an SMB drive. Your last post sounds like it's accessible via SFTP; if so, a library like JSch can be used to access it.

Neither library is trivial to use, so you will have to do some reading, learning, developing and testing ahead of you. But it's not rocket science, either.


ok, thank you very much, i will do that.
just did not know where to start...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!