• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

writing to a file on remote solaris machine

 
alwin das
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • 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?
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • 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
  • 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: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As long as you have file system access to the machine, using Java APIs will work just fine.
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic