I'm new to Xcode and the files I am using are straight up java
rather than
the cocoa-java bridge. I've got an a simple block of code that
runs fine
in Eclipse 3.1. I've created a Java Tool project in Xcode and
added my
files.
Are there any jars in the files you've added?
Yes. There is one jar used in this project. I've added it to my
project and in my target settings, under "Link Binary With Libraries"
I've selected "Merge". This seems to have solved my problem and now
my app will run. The only drawback (and its a big one) is that
building time has increased exponentially. So I am looking for other
options, if there are any.
"Exception in thread "main" java.lang.NoClassDefFoundError: javax/
jms/Message"
That's a J2EE/JMS class. J2EE isn't installed by default on Mac OS X.
If it's in a jar that Xcode is using by default, you'll have to
find where
that jar is, then add it to your program's classpath.
Can you state explicitly how this is done?
Now since it 1) Runs perfectly in Eclipse 2) Builds fine in Xcode,
I am
assuming there is a build setting in Xcode I am missing. Does
anyone have
any suggestions?
If it runs perfectly in Eclipse, it's probably because Eclipse is
setting
the classpath to include the J2EE/JMS jar. Look at exactly what
Eclipse is
doing to the classpath when it runs something.
If it builds fine in Xcode, it's because Xcode knows about a jar
that has
the class in it. I can't tell you which one it is, nor where Xcode is
finding it. However, if the class is in a jar you added to your
project,
then that's where Xcode is finding it. The remedy is to either
copy jars,
preset your classpath, or merge the jars into the output.
Like I said above, merging the jars does indeed work but the build
time is ridiculous. Any further suggestions would be greatly
appreciated. Thank you for your earlier suggestions!
-m
-- GG
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden