aspose file tools*
The moose likes Mac OS and the fly likes Any drawbacks of using a Mac to program java apps for multiple platforms? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Mac OS
Bookmark "Any drawbacks of using a Mac to program java apps for multiple platforms?" Watch "Any drawbacks of using a Mac to program java apps for multiple platforms?" New topic
Author

Any drawbacks of using a Mac to program java apps for multiple platforms?

Matt Wilcko
Ranch Hand

Joined: Sep 23, 2003
Posts: 65
Hi,
I plan on developing applications and games for both PC and Mac. Already own a pc, was considering buying a mac laptop(ibook g4). I would do most of the programming via Eclipse on the Mac. Are there any problems with doing this? Does Java for the Mac support all the APIs such as 2D, JAI(Advanced Imaging) etc? While i believe most users of the apps/games would be pc users, I thought it might be a good way to see if the programs ran problem free on a Mac.
Thanks,
Matt
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
The Java applications will be the same on for each (assuming you don't write separate code for each.) The differences will be the way that different OS platforms implement things like threading, video display, etc. You will need to test on each platform and see what those differences are. You may need to use configuration files (you can just use java.util.Properties for this) to set up different machines. You may even find differences in Win2K and WinXP and different displays (640x480, 1024x768).


Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Moving this to the Mac OS forum...


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Simon Brown
sharp shooter, and author
Ranch Hand

Joined: May 10, 2000
Posts: 1913
    
    6
You should have no problems (he says, touching wood!), although you should regularly test on the PC to check that you're not relying on any Apple specific features (e.g. the Java/OS X Finder integration) or bugs with the Apple JVM. I use my Mac for all my Java development (mainly J2EE web apps) and I've had no problems so far.
As far as IDEs go, I use IntelliJ IDEA with great success. I've not tried Eclipse but people have reported performance problems running Eclipse on OS X. Anybody got any opinions/experience on this?
Good luck and let us know if you find any problems.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61187
    
  66

Like Simon, I use a Mac to develop web apps in Java with no difficulty whatsoever.
However, I've seen somewhere that in order to get the latest JAI implementation, you need Panther (OS X 10.3). What the details are I am not sure, but it something that you might wish to investigate.
bear


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
David Shaw
Greenhorn

Joined: Nov 24, 2003
Posts: 1
I do all my java development on OSX and deploy on Sun and AIX. It works fine for that purpose.
I will say that the iBook specifically has a 1024x768 screen, which can prove to be too small for Eclipse and other IDEs. I often end up using BBEdit for code generation and ANT in a terminal for doing builds.
Kathy Sierra
Cowgirl and Author
Ranch Hand

Joined: Oct 10, 2002
Posts: 1572
Howdy -- I use the Mac (currently Panther) on a G4 Titanium to do everything. We did encounter one problem... running J2EE. A bug in the Reference Implementation of J2EE 1.3.1 (Linux distribution) works *fine* on the Mac, but shows up on other systems. So in that case, as I remember from the old days, things are almost always more likely to *work* on the Mac, so yes, always test on other environments. Write once - test everywhere. You also have to always know exactly what is supported and what is optional, too. I think there might be a few potential issues with Javasound and the availability of software instruments in the midi stuff. But those are the only two things I can think of right now. I'm sure if I were doing things that needed access to native hardware (3-d games, etc.) I might have run across far more issues.
We run Tomcat 5 for JSP/Servlets, and everything's just as you expect.
My big complaint now is with J2ME development. That seems to be a Big Problem on OS X (big meaning "no support"). You cannot run MIDP 2.0, I believe. And the fabulous Wireless Toolkit from Sun just won't run on OS X, because a small piece of it is apparently native (go figure!) However, I do have it working under Virtual PC -- but really really slowly.
I'm considering buying a cheap PC JUST to run the wireless toolkit, but I sure hate to do anything on a PC rather than my Mac.
At MacWorld a couple of weeks ago, I met the guy who is in charge of Java for Apple, and of course I made my complaints about J2ME known (along with Dan Steinberg, editor of java.net, who also made *his* complaints known). A lot of people seem to want J2ME development on the Mac -- it's such a natural place for writing games!!
Anyway, a huge chunk of the engineers at Sun use Macs for development now. The specification lead for either Servlets or JSP (can't remember which guy) develops on the Mac. At the development of the new certification exam for servlets and JSP (the new SCWCD), HALF of the engineers in the room were on Macs. Contrast this with four years ago when I came to work for Sun, and had to keep my Macness in the closet. With OS X, I "outed myself".
A few uber-geek Unix heads who now use and love Macs includes James Gosling, Tim O'Reilly, and I think Bill Joy. But I know there are other famous geek switchers.
The Apple Java guy was very committed to supporting Tiger on a good (didn't define "good") schedule, but there seemed to be much enthusiasm there. Wow! This is so different from just five years ago when the Java development team for Apple had been reduced to 1/2 person. That's right, one guy, part-time was the entire Java group at Apple, from what I could determine at that time.
cheers,
Kathy
hopeless Mac enthusiast
Tommy Braas
Greenhorn

Joined: Feb 07, 2004
Posts: 7
Kathy, or anyone else, just wondering if you have seen any problems with the J2EE RI 1.3.1 running under JDK 1.4.2 on Mac OS X 10.3.2? I keep getting an exception trying to start the darn thing. It happens during the JMS binding phase:
java.security.AccessControlException: access denied (java.lang.RuntimePermission modifyThreadGroup)
I'm trying to do the exercises in the Head First EJB book and it ain't working!
Thanks,
\tommy
P.S. Thanks for the Java 2 Certified Programmer exam guide Kathy! I just passed the exam with a 95% score! D.S.
Pauline McNamara
Sheriff

Joined: Jan 19, 2001
Posts: 4012
    
    6
Congratulations Tommy, well done!
And welcome to Javaranch. Looks like you started a new thread for your question here. 'Round these parts we try to discourage duplicate posts, that way you and the folks that answer you can meet up in just one place.

Hope you'll be visiting the ranch often,
Pauline
[ February 09, 2004: Message edited by: Pauline McNamara ]
Cleland Early
Ranch Hand

Joined: Apr 16, 2001
Posts: 38
Mac OS X works great for Java development, but I gave up on running the J2EE reference implementation for the HF EJB examples. I'd suggest that you install the tweaked version of JBoss that Apple distributes as part of the XCode 1.1 tools. It runs out of the box and features hot deployment, so you can just drop your EJB jar in the deployment folder and watch the debugging information in a terminal window as JBoss tries to deploy your EJBs. The J2EE resources are not part of the standard installation of Xcode 1.1, so you have to do a custom install.
[ March 10, 2004: Message edited by: Cleland Early ]
[ March 10, 2004: Message edited by: Cleland Early ]
Cleland Early
Ranch Hand

Joined: Apr 16, 2001
Posts: 38
I did my work on my Sun Certified Java Developer project on a Mac running Mac OS X using Project Builder. (This was some 20 months ago.) My project ran fine on Red Hat Linux the first time I tried it. I did have to make a few small changes to get it to run on Windows. In the end, both the client and server pieces of the project ran fine on all three platforms.
[ March 10, 2004: Message edited by: Cleland Early ]
Simon Brown
sharp shooter, and author
Ranch Hand

Joined: May 10, 2000
Posts: 1913
    
    6
Originally posted by Cleland Early:
... I'd suggest that you install the tweaked version of JBoss that Apple distributes as part of the XCode 1.1 tools. ...

That's interesting, I didn't realise that they'd tweaked JBoss. Do you know what they've done?
Cleland Early
Ranch Hand

Joined: Apr 16, 2001
Posts: 38
Originally posted by Simon Brown:

That's interesting, I didn't realise that they'd tweaked JBoss. Do you know what they've done?

They've rearranged the structure of the distribution directory so that it's a little flatter than the one provided by JBoss.org. This makes it somewhat easier to find the deployment directory. They've also modified the startup script so that it sets the necessary environment variables to the appropriate values for Mac OS X.
If you're running Mac OS X Server, you can use the Server Settings application to control JBoss.
There may be other changes as well.
[ March 12, 2004: Message edited by: Cleland Early ]
Warren Dew
blacksmith
Ranch Hand

Joined: Mar 04, 2004
Posts: 1332
    
    2
I've done most of my Java development using the CodeWarrior IDE on a Mac. Most of it to date has been server side code, where cross platform compatibility has been in my experience exceptional; I'm currently working on a Swing app, so I'll find out about GUI application compatibility soon.
Warren
Ian Foster
Greenhorn

Joined: Mar 15, 2004
Posts: 6
I hope this question is not off-topic, but is upgrading to Panther Server (10.3) the only way of getting an EJB container on OS X? I'm currently running 10.2.6 (client), but can't find any references to compatible J2EE downloads anywhere (well, anywhere I've so far looked...)
P.S. This site is great - I was referred here by the Head First EJB book but I don't think I'm the only one...
Loren Rosen
Ranch Hand

Joined: Feb 12, 2003
Posts: 156
Originally posted by Ian Foster:
I hope this question is not off-topic, but is upgrading to Panther Server (10.3) the only way of getting an EJB container on OS X? I'm currently running 10.2.6 (client), but can't find any references to compatible J2EE downloads anywhere (well, anywhere I've so far looked...)

jboss should work fine on the standard (non-server) 10.2.6. There was a problem a few years ago where the jboss startup script insisted on giving the jvm the -server flag, so you had to tweak the script, but I' pretty sure that was fixed quite a while ago.
Craig Sutherland
Greenhorn

Joined: Nov 25, 2003
Posts: 21
FWIW, JBoss runs without problems of the normal verion of 10.3.
Craig


When all at once a mighty herd of red eyed cows he saw...
Simon Brown
sharp shooter, and author
Ranch Hand

Joined: May 10, 2000
Posts: 1913
    
    6
I'll second that JBoss works "out of the box" on Jaguar. It's also possible to get WebLogic running on OSX!
Javini Javono
Ranch Hand

Joined: Dec 03, 2003
Posts: 286
Hi,


I did my work on my Sun Certified Java Developer project on a Mac running Mac OS X using Project Builder. (This was some 20 months ago.) My project ran fine on Red Hat Linux the first time I tried it. I did have to make a few small changes to get it to run on Windows. In the end, both the client and server pieces of the project ran fine on all three platforms.


Ditto: I am doing my Sun Certified Java Developer project on Mac OS X, but using JEdit
instead. The executable .jar file created on the Mac runs fine both on the Mac (as would
be expected) and on Windows 2000 Professional. To keep the interface tweaking to a
minimum, I used Sun's Metal Look and Feel.

In regard to the first question in this thread, I have read while perusing books in book
stores where it states that some API or APIs are not available on the Mac OS X, but I
can't recall what they were (though my memory is that they were related to advanced
graphics API or to an advanced sound-related API). If, and when, I stumble upon these
references again, I'll post them here.

I've done no J2EE development on the Mac yet.

Thanks,
Javini Javono
Sonny Pondrom
Ranch Hand

Joined: Jun 05, 2001
Posts: 128
I have started using Eclipse on my eMac OS X. The only thing I miss is the Java3D that I had developed on Windows.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Any drawbacks of using a Mac to program java apps for multiple platforms?