Re: Java and Xcode
Re: Java and Xcode
- Subject: Re: Java and Xcode
- From: Prachi Gauriar <email@hidden>
- Date: Sat, 10 Dec 2005 22:20:24 -0500
On Dec 10, 2005, at 2:32 PM, Frank Schmittroth wrote:
I'm a hobbiest Java programmer running Xcode 2.2 and OS 10.4.3. I
have a small project, Greenhouse, which builds and runs as a Java
Tool (i.e., it creates and runs a jar file).
I want to add a new Java class that has it's own main() method so
that it can be run on its own for testing purposes, an easy thing
to do from the command line. Has anyone addressed this problem
specifically for Java programs?
I've investigated adding new Targets and/or Executables to my
Project with little luck. Default Xcode seems more oriented to
creating build products that are executable in contrast to building
jar files where java itself is the executable. I don't see an easy
way to summarize my efforts and was hoping that somebody might have
some advice.
I'm not sure I understand your problem, so maybe you can clarify. Do
you want to add a class to the jar file that is not the jar's main
class, but that you can run to do some tests?
If so, I think you just need to create a custom executable that
points to java. Bring up the inspector on the executable, and click
on the Arguments tab. Add arguments for '-classpath $
(BUILT_PRODUCTS_DIR)/ProductName.jar' and 'NameOfClass', where
ProductName.jar is the name of the product and NameOfClass is the
class you want to execute.
HTH.
-Prachi
_______________________________________________
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