Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2007

Tip: Looking for answers? Try searching our database.

Connecting a windows network share from Java with a specificied usernameand password

Thread view: 
eramitnema@gmail.com - 25 Jul 2007 09:27 GMT
Hello,

I have a problem related to networking. I have a problem accessing
network shared drives from within my java classes.

I used the File object when I was developing. Everything worked fine.
However, I have to deploy to an application server, I need to supply a
user name and password to connect.

I am looking for an easy way to connect to a windows network share
with a user name and password from Java. I started to looking at JNI,
but I was hoping there might be an easier to use wrapper already
written.

I have a shared folder address as \\machine name\folder1, username and
password.

I assume this has something to do with Windows network security?

Can anybody help me?
Any help would be greatly appreciated.

Thanks in advance,
Amit
Jani Tiainen - 25 Jul 2007 10:34 GMT
eramitnema@gmail.com kirjoitti:
> Hello,
>
> I have a problem related to networking. I have a problem accessing
> network shared drives from within my java classes.

Sure you do since those are not really "drives".

> I used the File object when I was developing. Everything worked fine.
> However, I have to deploy to an application server, I need to supply a
[quoted text clipped - 4 lines]
> but I was hoping there might be an easier to use wrapper already
> written.

There is nice JCIFS (http://jcifs.samba.org/) package that has SMB
protocol implementation and allows you to work with SMB shares (that
includes Windows shares too).

> I have a shared folder address as \\machine name\folder1, username and
> password.
>
> I assume this has something to do with Windows network security?

Not really. It's just part of SMB protocol.

Signature

Jani Tiainen

Lew - 25 Jul 2007 15:19 GMT
Repeating Jani's fine answer for the benefit of those in clj.help who wouldn't
have seen it due to the multipost.

> eramitnema@gmail.com kirjoitti:
>> Hello,
[quoted text clipped - 23 lines]
>
> Not really. It's just part of SMB protocol.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.