Skip navigation.
 
mlRe: Does anybody program in Java?!?!
FROM : Alexander F. Hartner
DATE : Tue Oct 12 20:55:40 2004

I think that both are great languages, each with their own strength.
Java with it's platform
independence is great to develop applications that run anywhere. Swing
is very powerful
and let's you achieve a lot. Speed has improved drastically over the
years. I can't wait for Tiger
Java 1.5) to be release on the Mac.

On the other hand Cocoa also has very nice feature, but only runs on
the mac. This is I think
where the problem starts. To dilute Java write once run anywhere
proposition just to use it with
Cocoa is a bad idea. Cocoa / Objective C is easy to learn, so why not
use it for that. In general
I find Cocoa / Objective C support to be much more forthcoming compared
to Cocoa / Java. It is
being more thoroughly tested and used.

I also get the feeling that Cocoa / Java is not given the same priority
by Apple themselves. I am very
glad it does exist, but somehow their main focus lies in Objective C
and Java takes a second place.
In time this will improve, I think. Java support in X-Code has been
improved slowly in each version.

If you have a nifty Java API which you would like to use, the Java
Bridge is very nice too, but has
a few tricky bits. I have to say that using the Java Bridge in the
latest version of X-Code could be
a little improved. I would like an upgraded Project Type and not have
to use Legacy Application
anymore (But that is another story)

My recomendation to you would be :
- Decide what application you would like to develop. If you want to run
on other platforms use Java / Swing.
If you don't care about that use Cocoa / Objective C. If you don't want
to go through the learning curve. Still
use Java / Swing. Swing is rendered using Aqua Look and Feel in any
case.

I hope this helps
alex



On 12 Oct 2004, at 2:33, Stephen Vogelpohl wrote:

> In pursuit to the answer of the question I posted previously, I've
> noticed that hardly anyone answers java questions.  Does that mean
> hardly anybody programs in java and chooses objective C instead?  I
> can't believe that to be the case. So why is it that (seemingly) none
> of the java related questions get answered?  And if it is true, why is
> objective C a better way to go then Java?
>
> If you do know java, would you  mind answering my question (I've
> re-pasted it below)
>
> I'm just getting my feet wet with Java and Cocoa and
> have come across a blocking (but likely basic)
> problem.  Using Interface Builder I make a simple UI
> by just adding an NSButton object and using the drag
> method to create an NSMatrix of 10 of them in a
> column.  I then subclass the NSMatrix class and set
> the "Custom Class" field of my NSMatrix buttons to be
> this subclass.  I create the file for the NSMatrix
> class (selecting Java of course) but make no changes
> to the file.  I also make a subclass of NSObject which
> will be my controller class.  I instantiate it, and
> create it's files.  Once again, I do nothing with that
> file.  I then do a build and run and am presented with
> the following error message:
>
> 004-10-09 18:10:16.143 MyApp[863] AppKitJava: uncaught
> exception NSArchiverArchiveInconsistency (*** file
> inconsistency: read '@', expecting 'C')
> 2004-10-09 18:10:16.157 MyApp[863] AppKitJava:
> exception = *** file inconsistency: read '@',
> expecting 'C'
> 2004-10-09 18:10:16.159 MyApp[863] AppKitJava:
> terminating.
>
> Anybody know why this is giving me problems?  If I do
> the same thing but instead of subclassing NSMatrix, I
> just set the custom class of  my matrix of buttons to
> be NSMatrix, it builds and runs without a problem.  I
> only get this error as soon as I subclass the NSMatrix
> and set the custom class of my NSMatrix of buttons to
> that new subclass.  I'm sure the problem is some basic
> concept I'm not aware of.  Your help would be GREATLY
> appreciated to get this newbie on his way to
> java/cocoa programming greatness :-)
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list      (<email_removed>)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
> This email sent to <email_removed>
>

Related mailsAuthorDate
mlDoes anybody program in Java?!?! Stephen Vogelpohl Oct 12, 02:33
mlRe: Does anybody program in Java?!?! Jacob Lukas Oct 12, 02:54
mlRe: Does anybody program in Java?!?! Mohamed Rafi S Oct 12, 03:01
mlRe: Does anybody program in Java?!?! Scott Stevenson Oct 12, 05:42
mlRe: Does anybody program in Java?!?! James Bucanek Oct 12, 17:01
mlRe: Does anybody program in Java?!?! Alexander F. Hartn… Oct 12, 20:55
mlRe: Does anybody program in Java?!?! Christopher Forsyt… Oct 12, 21:02
mlRe: Does anybody program in Java?!?! Manfred Schwind Oct 14, 10:14
mlRe: Does anybody program in Java?!?! Alexander F. Hartn… Oct 15, 23:07