• 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
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

writing to a file on remote solaris machine

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

in my java program i have some data which i want to write in the .txt file on remote solaris machine.
first timei will create a new file and then after that i will append the data in that file.
can i use solaris script to create a new file in my java program ?do you know the script?or else how can i do that?
 
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure what you mean by "Solaris script", but as long you have access to the remote file system you can just use the standard Java APIs. Or is the remote FS not mounted?
 
alwin das
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
actually i want to do somthing like this:

i want to write create new file on remote solaris machine using javaprogram.

can i do it in standard way using java like what we usually do on windows, or i have to run some solaris command as well from my javaprogram which will create a file on solaris machine?

i am new to solaris so not very sure
 
Ulf Dittmer
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As long as you have file system access to the machine, using Java APIs will work just fine.
 
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What Ulf means is that if you have the disk in the Solaris machine mapped as a network share on your machine you can access it like you would a local drive.
If not, you can't do anything with it directly. You'll need to write some network interface to communicate with a process on the other machine that can write the file for you in that case.
 
There’s no place like 127.0.0.1. But I'll always remember this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic