Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Compiling SimpleJavaLauncher
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Compiling SimpleJavaLauncher



Following on from my earlier thread, I'm still having problems linking SimpleJavaLauncher, available from http://developer.apple.com/samplecode/simpleJavaLauncher/simpleJavaLauncher.sit

I'm using CodeWarrior but the Mac OS X PowerPC Mach-O linker crashes every time I try to build it. Anyone here using CodeWarrior and know how to build this project?

Alternatively, what sort of gcc and ld command line options would I use? I don't do much C++ development on the Mac and the man pages are somewhat intimidating as an introduction to the subject! I don't even know what kind of executable I want. It's command line only, not an "application" with a GUI, so I don't want a dock icon etc., but I do need a CFRunLoop it seems or I can't initialise AWT.

(I don't want to use XCode, as introducing another IDE will further complicate my overall build process.)

Many thanks,

-Rolf

At 10:10 am -0800 21/3/05, email@hidden wrote:
>>I am writing a C++ command line program (using CodeWarrior and the
Mac OS X PowerPC Mach-O linker to create an executable) in which I
want to invoke a Java VM.

The class I'm trying to use indirectly uses AWT. It executes as
expected if I run it using "java -cp ...", but if I run it from my
>>program I get the following error:

2005-03-20 22:47:18.355 mytest[1041] Apple AWT Java VM was loaded on first thread -- can't start AWT. ...

Look on ADC for Apple's example code for a java launcher. I think the error isn't in your Java code where it initializes the AWT Toolkit, but in your C++ code that starts the JVM.

Scott

Thanks, I'm sure you're right and it's to do with my launcher. I've downloaded the SimpleJavaLauncher example which creates a new thread and calls CFRunLoop. Unfortunately, adding the CoreFoundation framework put my CodeWarrior into a state where it crashes every time I try and build the project, but that's a separate problem!

-- Rolf Howarth, Square Box Systems Ltd, Stratford-upon-Avon UK. _______________________________________________ Do not post admin requests to the list. They will be ignored. Java-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.