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

Need some help...

Riddhi Joshi

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.
karl koch
Ranch Hand

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

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

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.
I agree. Here's the link:
subject: Need some help...
It's not a secret anymore!