I hope I'm posting this in the right section, if not, I hope it gets moved to the right one without penalization.
I'm a n00b to jME, Eclipse, and Java (haha!) but I AM a programmer in other languages in other environments so I'm not totally clueless.
I followed the instructions here to get jMe into my Eclipse http://www.jmonkeyengine.com/wiki/doku.php/setting_up_eclipse_to_build_jme_2
I believe I have Eclipse 3.5, I got it last week. I'm using Mac OS X (10.5) I'm using JRE 1.4 I believe. I downloaded jME today using the SVN plugin. When I got to the part where I point the .jar files, the swt.jar file was missing from the list. I found it in the lib folder (I tried Cocoa first [swt-fake.jar]) and added it to the list of jars but that didn't eliminate the errors.
I reversed that, and then added the swt.jar under carbon and that fixed the compiler errors, and then tried to compile the first simple game tutorial further down the page (in a class file in the default package under jME src folder).
This is what I get when I try to run it as a java application in Eclipse: (no application window appears)
Mar 11, 2010 10:25:48 PM com.jme.app.BaseGame start
INFO: Application started.
Mar 11, 2010 10:25:48 PM com.jme.system.PropertiesGameSettings <init>
INFO: PropertiesGameSettings created
Mar 11, 2010 10:25:48 PM com.jme.system.PropertiesGameSettings load
WARNING: Could not load properties. Creating a new one.
2010-03-11 22:25:48.634 java[33824:80f] [Java CocoaComponent compatibility mode]: Enabled
2010-03-11 22:25:48.636 java[33824:80f] [Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.100000
2010-03-11 22:25:49.665 java[33824:12e03] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x19d640> '(null)') unlocked when not locked
2010-03-11 22:25:49.666 java[33824:12e03] *** Break on _NSLockError() to debug.
2010-03-11 22:25:49.788 java[33824:12e03] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x19dda0> '(null)') unlocked when not locked
2010-03-11 22:25:49.793 java[33824:12e03] *** Break on _NSLockError() to debug.
2010-03-11 22:25:49.895 java[33824:12e03] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x19e360> '(null)') unlocked when not locked
2010-03-11 22:25:49.896 java[33824:12e03] *** Break on _NSLockError() to debug.
2010-03-11 22:25:50.002 java[33824:12e03] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x19e570> '(null)') unlocked when not locked
2010-03-11 22:25:50.002 java[33824:12e03] *** Break on _NSLockError() to debug.
2010-03-11 22:25:50.104 java[33824:12e03] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x19e730> '(null)') unlocked when not locked
2010-03-11 22:25:50.113 java[33824:12e03] *** Break on _NSLockError() to debug.
2010-03-11 22:25:50.222 java[33824:12e03] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x19e860> '(null)') unlocked when not locked
2010-03-11 22:25:50.223 java[33824:12e03] *** Break on _NSLockError() to debug.
2010-03-11 22:25:50.327 java[33824:12e03] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x19e690> '(null)') unlocked when not locked
2010-03-11 22:25:50.328 java[33824:12e03] *** Break on _NSLockError() to debug.
2010-03-11 22:25:50.429 java[33824:12e03] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x19e990> '(null)') unlocked when not locked
2010-03-11 22:25:50.430 java[33824:12e03] *** Break on _NSLockError() to debug.
2010-03-11 22:25:50.531 java[33824:12e03] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x19eae0> '(null)') unlocked when not locked
2010-03-11 22:25:50.532 java[33824:12e03] *** Break on _NSLockError() to debug.
2010-03-11 22:25:50.635 java[33824:12e03] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x19ecf0> '(null)') unlocked when not locked
2010-03-11 22:25:50.635 java[33824:12e03] *** Break on _NSLockError() to debug.
2010-03-11 22:25:50.736 java[33824:12e03] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x19ed50> '(null)') unlocked when not locked
2010-03-11 22:25:50.737 java[33824:12e03] *** Break on _NSLockError() to debug.
2010-03-11 22:25:50.839 java[33824:12e03] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x19f020> '(null)') unlocked when not locked
2010-03-11 22:25:50.840 java[33824:12e03] *** Break on _NSLockError() to debug.
I have to manually stop the process there.
What's going on, am I posting something that's already been posted?
I just want to toy with the engine a bit while I learn Java and such. I've schooled myself on how to use Eclipse pretty well (like the outline view, the console view, the hierarchies and such) so that's not a problem.
I looked in the wiki, but didn't find anything.
Thanks in advance for any help!
Asher
Ah yes, this is an issue with SWT and OS X. Simply remove swt.jar from your classpath… Alternatively, I've had a small bit of luck running the later versions of the SWT jar from Eclipse but I haven't had a chance to test all of the functionality…
You can find the current stable and development builds here: SWT: The Standard Widget Toolkit | The Eclipse Foundation (Just add the latest OS X stable to your classpath)
Thanks! That appeared to work for now. Although it's left errors in my overall source that Eclipse reports. I tried downloading the SWT jar from Eclipse's website but it still didn't work.
The application now appears to run, so, what is the SWT.jar used for in the jME project?
Asher
Swt is knda like swing, so its mostly a canvas for swt guis. Normally you wont need it so don't bother.
Alright, well, I just put everything that had anything to do with SWT in jME into my exclusion filter in my build path, a nifty tip for anybody who doesn't want to have 100 compile errors get in his way every time. Now I have no reported compile errors, and the source runs just fine, I'll just know not to use anything that requires those files, for now. I've been looking elsewhere around the web, and it appears this is a problem that hasn't yet been resolved in many software packages, even Eclipse itself even though they claim their latest SWT build and download for Eclipse should be Cocoa compatible.
Thanks for all your guys help, all the tests are working now, as well as my example,
Asher
asherwolf said:
I've been looking elsewhere around the web, and it appears this is a problem that hasn't yet been resolved in many software packages, even Eclipse itself even though they claim their latest SWT build and download for Eclipse should be Cocoa compatible.
Thanks for all your guys help, all the tests are working now, as well as my example,
Asher
Good to hear you're in working order now :) And yes, the whole SWT issue is a strange one. It's a shame too because it's light years better to work with than Swing, just not as dependable in some arenas.