• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

writing to a file on remote solaris machine

 
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?
 
Rancher
Posts: 43009
76
  • 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: 43009
76
  • 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.
 
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!