This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Java in Windows and  MacOS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Java in Windows and  MacOS" Watch "Java in Windows and  MacOS" New topic
Author

Java in Windows and MacOS

Mohamed anvar sithik
Greenhorn

Joined: Jan 28, 2005
Posts: 7
Hai
I have written a java program in Windows platform. If i am going to
write the same program using java in Mac OS . Is we need to change any thing in the program to make it comapatible with Mac OS.

For eg., If my program in windows is going to refer the windows registry. But in Mac OS there is no concept of registry . How to make make it compatible for both OS.
Jason Kingsley
Greenhorn

Joined: Feb 21, 2004
Posts: 18
If you use platform specific functionalilty, of which the Windows Registry is definately one, then you simply cannot use the the functionality "as is".

What you will have to do is abstract away the notion of the underlying mechanism. One way is to have your code talk to either an interface/abstract definition of the functionality that you want. Your other layers of code do not (should not) care about the underlying implementation. Then you can strategise the concrete implementation specific for the platform, it will then be easily extensible should you move to other platforms.

If you don't know about design patterns, you may wish to brush up on the famous patterns (by the "gang-of-four") to gain a better understanding of the mechanisms used and how you can apply them to your problem. Such things as these provide the logical solutions for such problems.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java in Windows and MacOS
 
Similar Threads
Portability
Setting system date
iphone development
How to access the windows registry
file type association with my java program