Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Beginning Java and the fly likes Newbie, Need Java clarification Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Newbie, Need Java clarification" Watch "Newbie, Need Java clarification" New topic
Author

Newbie, Need Java clarification

Dave Guenthner
Greenhorn

Joined: Jan 25, 2003
Posts: 4
Hello. I am a Sys Admin and have been using VBScript and Perl for some time and now looking into Java. Can you initiate a system call to the OS from within java. For example, sometimes in perl I use the system command which allows me to use some Windows native commands which are better in certain instances, like net use etc. I want to be able to run a java program from my machine and access files on remote machines to parse, getdata, etc. Those remote machines are 98% Windows and have the JRE 1.3 installed. Any suggestions would be great.
Thanks in advance,
Dave
Hari Gangadharan
Ranch Hand

Joined: Mar 08, 2001
Posts: 73
Use Runtime to do that. However it makes your code platform dependent.


To make it a little more platform independent, best way is to look for the executable at the path(s) you expect - if not found ask the user to locate the executable.
Hope this helps.


<B>Hari Gangadharan</B><BR>Unix is user friendly..<BR>but it chooses to whom it is friendly with!
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Newbie, Need Java clarification
 
Similar Threads
to upload a file to a remote server on the network
Call UNIX commands from JAVA
is RMI supporting clustered Environment?
Eclipse projects on removable media
How Do I programmatically change the desktop resolution?