aspose file tools*
The moose likes Java in General and the fly likes writing to a file on remote solaris machine Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "writing to a file on remote solaris machine" Watch "writing to a file on remote solaris machine" New topic
Author

writing to a file on remote solaris machine

alwin das
Ranch Hand

Joined: Sep 23, 2005
Posts: 32
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
Marshal

Joined: Mar 22, 2005
Posts: 41905
    
  63
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?


Ping & DNS - my free Android networking tools app
alwin das
Ranch Hand

Joined: Sep 23, 2005
Posts: 32
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
Marshal

Joined: Mar 22, 2005
Posts: 41905
    
  63
As long as you have file system access to the machine, using Java APIs will work just fine.
Jeroen T Wenting
Ranch Hand

Joined: Apr 21, 2006
Posts: 1847
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.


42
 
Consider Paul's rocket mass heater.
 
subject: writing to a file on remote solaris machine