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 > Java and Coca

Java and Coca
Thread Tools
Fresh-Faced Recruit
Join Date: Apr 2001
Location: Portland,Oregon,United States
Status: Offline
Reply With Quote
Apr 2, 2001, 12:38 PM
 
This may be a dumb question, but I'll ask it anyway. When you write a java app using coca for the gui does your application use the jvm? I have written a little test program and when it is running I don't any sign of the jvm. Although it runs a little slow, like all java applications, it appears to be a "native" app.
ps Are there any good tutorials on the coca classes available in project builder? The pdfs in the document dir don't give enough info.
     
Dedicated MacNNer
Join Date: Apr 1999
Location: MA
Status: Offline
Reply With Quote
Apr 2, 2001, 12:49 PM
 
The reason why it looks like a native app, is because it's using the cocoa classes for the interface. For all intents, it is a native app. Except for the fact that the JVM still needs to run.

To check this, start the app, and then from the command line, do a ps -ax... if you see a java instance, than the JVM is running. If you don't, then either a) it is running... just inside the app's process. or b) it's not running because Project Builder compiled the java to native code -- highly unlikely.

The biggest thing going for the existance of the JVM is the fact that you can call standard java classes from within your code -- classes that are only available as java bytecode.

BTW, I think that java is an interesting way of programming for OS X. It's kind of puzzling at first, when you realise that one of the big benefits of java programming -- the platform independence -- is removed when you tie yourself to Cocoa. But, as a language, java has a lot of features that make it more desireable than C++ or obj-c. I'm thinking of writing a small app in Java w/the cocoa api, just to test the waters. But, with all the hassle of learning cocoa, I might as well jump in full tilt with a obj-c app instead... decisions, decisions...

------------------
dennis
dennis
     
Fresh-Faced Recruit
Join Date: Apr 2001
Location: Portland,Oregon,United States
Status: Offline
Reply With Quote
Apr 2, 2001, 01:28 PM
 
If you do ps -ax or look in the process viewer there is no sign of the jvm anywhere. It must be running under the apps process.
     
   
Thread Tools
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
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 02:52 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2