• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: xcode 3 java package problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: xcode 3 java package problem


  • Subject: Re: xcode 3 java package problem
  • From: Greg Guerin <email@hidden>
  • Date: Sun, 24 Feb 2008 11:22:10 -0700

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:

This email sent to email@hidden

  • Prev by Date: Extra indentation after opening bracket in Xcode 3.0
  • Next by Date: Re: CVS tool missing after uninstalling Xcode 3.0 and reinstalling Xcode 2.5
  • Previous by thread: xcode 3 java package problem
  • Next by thread: CVS tool missing after uninstalling Xcode 3.0 and reinstalling Xcode 2.5
  • Index(es):
    • Date
    • Thread