This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Java in General and the fly likes Need some help... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "Need some help..." Watch "Need some help..." New topic
Author

Need some help...

Riddhi Joshi
Greenhorn

Joined: Dec 29, 2002
Posts: 21
Hello Everyone,
I have written a Java program that runs on Windows. I want to know how can I run that program on other environment like Unix, Linux or Mac. I am sure that it is a platform independent language so my program will definitely run. But I am not sure if I have to make some changes in the program.
As a matter of fact, I need to know the shell out commands of Unix, Linux or Mac to make my program functional.
I hope I am clear with my question.
It would be a great help if anyone can get back with an answer.
Thanks.
karl koch
Ranch Hand

Joined: May 25, 2001
Posts: 388
hi
no need to change the classes. they run ony any OS with a virtual machine (and the good version of the virtual machine)

k
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Indeed, there's no need to change your classes but if you happen to do 'Runtime.getRuntime.exec(" ...") stuff, you certainly *do* have to change something if you want to port your code from windows to *nix, OS/400, MacOS or whatever ...
kind regards
Riddhi Joshi
Greenhorn

Joined: Dec 29, 2002
Posts: 21
Thanks for getting back to me.
Actually I am making use of Runtime().exec(...).
I have handled all the windows environment with this command. But I am not sure which shell out commands should be used in canse of Unix, Linux and Mac.
It would be great if you could help me out with that.
Thanks,
Riddhi
 
GeeCON Prague 2014
 
subject: Need some help...