Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: xcode 3 java package problem



Dave Mihalik wrote:

>Step 4:  Build and Go
>
>This used to work in Xcode 2.4 but I get the following error in Xcode 3:
>
>Exception in thread "main" java.lang.NoClassDefFoundError: test1

First, in Xcode 3, new Java projects will be built by Ant.  This changes
things quit a bit from Xcode 2.4.  If you want the same kind of Java
projects in Xcode 3, you have to start with an empty project then add a
Java Tool target.  That will give you a JAM-built target.


Second, in Xcode 3, the default executable for a Java Tool project has this
for Arguments:
  -cp test1.jar test1

In Xcode 2.4, it had this:
  -jar test1.jar

The first form won't use the manifest in the jar, the second one will.

To fix this, change your executable's Arguments to this:
  -jar test1.jar
and file a bug:
  <http://developer.apple.com/bugreporter>


Finally, Xcode doesn't appear to detect an unsaved Manifest file, so if you
hadn't saved it manually, then the build (done by Ant) would actually be
putting the older Manifest into the jar, and you'd have no indication this
happened.

  -- GG


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

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 © 2007 Apple Inc. All rights reserved.