• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

upload file to windows share folder running on unix

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hi, I am having requirement to upload the files into windows share folder, It works fine If I run the application on windows, but we moved the application to UNIX, so right now the client has to upload the files to windows shareholder , server is running on the UNIX,

as I am using the simple File file = new File(//share/shareholder),

so the problem is once we move to UNIX, how can I handle ., any example will really helpful.

Thanks
Srikanth
 
author & internet detective
Posts: 42055
926
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Srikanth,
Welcome to JavaRanch!

I'm not sure if this is a Java question or a UNX one. I'm going to move it to our UNIX forum where people are more likely to know than here in JSP.
 
Saloon Keeper
Posts: 28396
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Install the Samba client on the Linux system and define a mountpoint where you want your Windows share to be mounted.

Add an entry to /etc/fstab to cause the share to be mounted at boot time (you can mount manually, but that gets old after a while). You want do make it do something like this:

mount -t cifs //winhost/sharename /mnt/winshare

Ensure that you have appropriate file access and firewall rights. Once you have the ability to access the share from the command line, the webapp server can reference it exactly the same as it would for local files.
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic