Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Cocoa Java site?

Cocoa Java site?
Thread Tools
citoc
Fresh-Faced Recruit
Join Date: Oct 2000
Status: Offline
Reply With Quote
Jun 11, 2002, 12:47 AM
 
Just wondering if there is a site out there devoted to using the Java language for Cocoa programming? I know (a bit) of Java, and would like to leverage that knowledge to make Cocoa programs. I've run through the Temperature Converter tutorial, but I still have many questions. I'm playing around with BP, but I can't seem to create a Cocoa app based on a Java app I already have. Or get a button on a window to do anything, for that matter.

So I'm wondering if there is some place out there which discusses the issues etc of using Java for Cocoa programming.

Thanks.
"For once timid traveler, be careless and utterly lose your way." -Rabindranath Tagore
     
dogwood
Junior Member
Join Date: May 2002
Location: Australia
Status: Offline
Reply With Quote
Jun 11, 2002, 02:17 AM
 
I have been looking around for the same web-site, and I regreat to say that I have not found it. It seems like Cocoa Java is always a secondery player to Cocoa Objective-c. I think that hs is becuase Cocoa Java was added by Apple simple to leverage the huge Java developer community. Yet it seems not to have been recieved as well as cocoa objective-c. The usual statemeant is that if you want to do a MacOSX native application then use cocoa objective-c. Java is not native, so do not bother, trying to make it native.

I am told that if you know Java then Objective-c is not that hard to pick up. I really think apple should do better in their documentation for Cocoa Java if thei ever expect it to be used. Best try is to follow some of these links.

<a href="http://osx.hyperjeff.net/links.html" target="_blank">hyperjeff links page</a>
     
Angus_D
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Jun 12, 2002, 01:47 PM
 
The only site I know entirely about Cocoa-Java is the one telling you exactly why you shouldn't use it ever ever ever!
     
citoc  (op)
Fresh-Faced Recruit
Join Date: Oct 2000
Status: Offline
Reply With Quote
Jun 13, 2002, 01:19 AM
 
Thanks for the links. Though the only one on Cocoa Java exclusively does seem to be the BNR piece on why to avoid it like the plague :-P It may be a bit old, but still makes some good points.

I was under the impression that Cocoa Java was using the Java language and syntax to call Cocoa frameworks, rather than (as it appears?) that one is using Java and Java wrappers on Cocoa Frameworks. So maybe sticking with pure Java would be best . . .

Anyone out there up to making a Cocoa Java website with tips, tricks, examples? Is it even worth it, or should Cocoa stay the realm of Obj-C, and Java remain in its pure form on OS X?
"For once timid traveler, be careless and utterly lose your way." -Rabindranath Tagore
     
dogwood
Junior Member
Join Date: May 2002
Location: Australia
Status: Offline
Reply With Quote
Jun 13, 2002, 03:13 AM
 
Cocoa Java is a baby, I think Apple did not spend all that time adding support for it not to keep making it better. You can gamble and try your best Cocoa Java now, and hope that Apple makes Cocoa Java better. Or you can, just give it a miss. I am betting they will get it better, there are 1 million professional Java Developers in the world. If half of them see Cocoa Java as a real option just think about the impact it could have on mac software market. Apple cannot pass that bye.
     
Gul Banana
Mac Elite
Join Date: May 2002
Status: Offline
Reply With Quote
Jun 13, 2002, 10:03 AM
 
Cocoa-Java is a very nice development environment. You get the wonderful Cocoa frameworks with the familiar and sensible Java syntax structure; it's easy to pick up if you're familiar with Java or Cocoa already, and if you already know both there's basically no work involved.

That said, it's completely useless.

It's totally non-portable, since it relies on a zillion mac os x-specific features, yet it is still run through the Java VM when executed. It's all the worst bits of Java with all the worst bits of Cocoa.
[vash:~] banana% killall killall
Terminated
     
citoc  (op)
Fresh-Faced Recruit
Join Date: Oct 2000
Status: Offline
Reply With Quote
Jun 15, 2002, 11:36 PM
 
So Java it is . . . :-)

Thanks for the thoughts!
"For once timid traveler, be careless and utterly lose your way." -Rabindranath Tagore
     
Species 8472
Fresh-Faced Recruit
Join Date: Dec 2001
Location: Fluidic Space
Status: Offline
Reply With Quote
Jun 20, 2002, 12:50 PM
 
<a href="http://www.whiningdog.net/articles/LCIJ/page0.php" target="_blank">cocoa java</a>
     
Species 8472
Fresh-Faced Recruit
Join Date: Dec 2001
Location: Fluidic Space
Status: Offline
Reply With Quote
Jun 20, 2002, 12:56 PM
 
</font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">quote:</font><hr /><font size="1" face="Geneva, Verdana, Arial, sans-serif">Originally posted by Gul Banana:
<strong>It's totally non-portable, since it relies on a zillion mac os x-specific features, yet it is still run through the Java VM when executed. It's all the worst bits of Java with all the worst bits of Cocoa.</strong></font><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">It is true that the Cocoa interface is non-portable, but you can re-use the same Java classes in any Java app, this is the beauty of OOP.
     
absmiths
Mac Elite
Join Date: Sep 2000
Location: Edmond, OK USA
Status: Offline
Reply With Quote
Jun 21, 2002, 12:01 PM
 
</font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">quote:</font><hr /><font size="1" face="Geneva, Verdana, Arial, sans-serif">Originally posted by Species 8472:
<strong> </font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">quote:</font><hr /><font size="1" face="Geneva, Verdana, Arial, sans-serif">Originally posted by Gul Banana:
<strong>It's totally non-portable, since it relies on a zillion mac os x-specific features, yet it is still run through the Java VM when executed. It's all the worst bits of Java with all the worst bits of Cocoa.</strong></font><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">It is true that the Cocoa interface is non-portable, but you can re-use the same Java classes in any Java app, this is the beauty of OOP.</strong></font><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">That is a big deal. I was hoping to use it to provide a cocoa front end to a bunch of Java server code that is already written. Java GUI's are OK, but if I can do one in cocoa instead without having to introduce a new language into the system than that would be much better.
     
Species 8472
Fresh-Faced Recruit
Join Date: Dec 2001
Location: Fluidic Space
Status: Offline
Reply With Quote
Jun 22, 2002, 04:26 AM
 
</font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">quote:</font><hr /><font size="1" face="Geneva, Verdana, Arial, sans-serif">Originally posted by absmiths:
That is a big deal. I was hoping to use it to provide a cocoa front end to a bunch of Java server code that is already written. Java GUI's are OK, but if I can do one in cocoa instead without having to introduce a new language into the system than that would be much better.[/QB]</font><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">If your classes make use of java collections, then you must remember to import them.
     
Gul Banana
Mac Elite
Join Date: May 2002
Status: Offline
Reply With Quote
Jun 22, 2002, 09:49 AM
 
</font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">quote:</font><hr /><font size="1" face="Geneva, Verdana, Arial, sans-serif">Originally posted by Species 8472:
<strong> </font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">quote:</font><hr /><font size="1" face="Geneva, Verdana, Arial, sans-serif">Originally posted by Gul Banana:
<strong>It's totally non-portable, since it relies on a zillion mac os x-specific features, yet it is still run through the Java VM when executed. It's all the worst bits of Java with all the worst bits of Cocoa.</strong></font><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">It is true that the Cocoa interface is non-portable, but you can re-use the same Java classes in any Java app, this is the beauty of OOP.</strong></font><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">That's true, actually. Non-Cocoa java is usable in Cocoa Java, although not the other way around (It's not just the interface, it's the whole UI). That said, yes, it is quite good for making an os x frontend to Pure Java stuff.
[vash:~] banana% killall killall
Terminated
     
absmiths
Mac Elite
Join Date: Sep 2000
Location: Edmond, OK USA
Status: Offline
Reply With Quote
Jun 24, 2002, 11:38 AM
 
</font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">quote:</font><hr /><font size="1" face="Geneva, Verdana, Arial, sans-serif">Originally posted by Species 8472:
<strong> </font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">quote:</font><hr /><font size="1" face="Geneva, Verdana, Arial, sans-serif">Originally posted by absmiths:
That is a big deal. I was hoping to use it to provide a cocoa front end to a bunch of Java server code that is already written. Java GUI's are OK, but if I can do one in cocoa instead without having to introduce a new language into the system than that would be much better.</strong></font><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">If your classes make use of java collections, then you must remember to import them.[/QB]</font><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">
     
Species 8472
Fresh-Faced Recruit
Join Date: Dec 2001
Location: Fluidic Space
Status: Offline
Reply With Quote
Jun 24, 2002, 02:56 PM
 
</font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">quote:</font><hr /><font size="1" face="Geneva, Verdana, Arial, sans-serif">Originally posted by absmiths:
<strong> </font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">quote:</font><hr /><font size="1" face="Geneva, Verdana, Arial, sans-serif">Originally posted by Species 8472:
<strong> </font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">quote:</font><hr /><font size="1" face="Geneva, Verdana, Arial, sans-serif">Originally posted by absmiths:
That is a big deal. I was hoping to use it to provide a cocoa front end to a bunch of Java server code that is already written. Java GUI's are OK, but if I can do one in cocoa instead without having to introduce a new language into the system than that would be much better.</strong></font><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">If your classes make use of java collections, then you must remember to import them.</strong></font><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif"> [/QB]</font><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">For example you write the following code:

import java.util.Vector

This command enables your program to make use of the java Vector class, which means you can call upon methods for storing data in a Vector. If you don't know anything about using java collections I would recommend that you get a book about data structures and algorithms in java.
     
absmiths
Mac Elite
Join Date: Sep 2000
Location: Edmond, OK USA
Status: Offline
Reply With Quote
Jun 24, 2002, 03:35 PM
 
</font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">quote:</font><hr /><font size="1" face="Geneva, Verdana, Arial, sans-serif">Originally posted by Species 8472:
<strong> </font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">quote:</font><hr /><font size="1" face="Geneva, Verdana, Arial, sans-serif">Originally posted by absmiths:
<strong> </font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">quote:</font><hr /><font size="1" face="Geneva, Verdana, Arial, sans-serif">Originally posted by Species 8472:
<strong> </font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">quote:</font><hr /><font size="1" face="Geneva, Verdana, Arial, sans-serif">Originally posted by absmiths:
<strong>That is a big deal. I was hoping to use it to provide a cocoa front end to a bunch of Java server code that is already written. Java GUI's are OK, but if I can do one in cocoa instead without having to introduce a new language into the system than that would be much better.</strong></font><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">If your classes make use of java collections, then you must remember to import them.</strong></font><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif"> </strong></font><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">For example you write the following code:

import java.util.Vector

This command enables your program to make use of the java Vector class, which means you can call upon methods for storing data in a Vector. If you don't know anything about using java collections I would recommend that you get a book about data structures and algorithms in java. </strong></font><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">I was trying to tell you politely that I understand the usage of imports in Java (witness my claim that I had a "bunch of Java server code" to interface to cocoa), and I was curious what part your interjection about import statements had to do with the topic at hand?

FWIW, when people talk about The Collections API they are usually not talking about Vector or Hashtable - that would be List and Map.

<small>[ 06-24-2002, 03:37 PM: Message edited by: absmiths ]</small>
     
Species 8472
Fresh-Faced Recruit
Join Date: Dec 2001
Location: Fluidic Space
Status: Offline
Reply With Quote
Jun 25, 2002, 03:10 AM
 
</font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">quote:</font><hr /><font size="1" face="Geneva, Verdana, Arial, sans-serif">Originally posted by absmiths:
<strong></font><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">I was trying to tell you politely that I understand the usage of imports in Java (witness my claim that I had a "bunch of Java server code" to interface to cocoa), and I was curious what part your interjection about import statements had to do with the topic at hand?

FWIW, when people talk about The Collections API they are usually not talking about Vector or Hashtable - that would be List and Map.</strong>

Sorry for not being more specific, but I was not talking about your server code. You know, there are other readers here too who want to learn how to use java code in cocoa. And I know that Vector was a stupid example, but I just wanted to show how the import command works, and Vector was the first thing that popped up in my mind.

<small>[ 06-25-2002, 03:16 AM: Message edited by: Species 8472 ]</small>
     
Dennis the Phantom Menace
Forum Regular
Join Date: Mar 2002
Location: San Jose, CA
Status: Offline
Reply With Quote
Jun 26, 2002, 06:33 AM
 
Species 8472, thanks for that great link!
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 08:50 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,