Re: Building Java App, can't copy all resources to proper directories
Re: Building Java App, can't copy all resources to proper directories
- Subject: Re: Building Java App, can't copy all resources to proper directories
- From: David Ewing <email@hidden>
- Date: Mon, 16 May 2005 13:34:54 -0600
You should be able to double-click to edit.
Dave
On May 16, 2005, at 12:14 PM, Paul Archibald wrote:
Thanks for the response.
I tried that. The information there does confirm that my images are
being copied to the wrong place. I see something like :
File
Destination Subdirectory
----------------------------------------------------------------------
-----------
<bunches of files >
src/apples/resource/jon.gif src/apples/
resource
src/oranges/resource/nav.gif oranges/resource
<many more files>
Note that the "apples" destination starts with "src", but "oranges"
does not. In fact, Xcode has created a "src/apples/resource"
directory in the build/Fruit/JavaClasses/ directory, but the
"oranges/resource" dir is in the proper place: build/Fruit/
JavaClasses/ oranges/resource/.
Your suggestion would be great if I could edit the settings in the
Target>Java Build Resource panel, but it seems to be read-only.
Paul
On May 16, 2005, at 10:14 AM, David Ewing wrote:
Dbl-click your target and go to the Java Resources build phase.
Confirm the settings in "destination subdirectory" column.
Dave
On May 15, 2005, at 6:17 PM, Paul Archibald wrote:
I am trying to build an all-java application with xcode. I have a
bunch of java source files, and a bunch of image files. The way
the files are organized in the directory looks a bit like:
Fruit
- Fruit.xcode <project file
- src
- - apples << the apples module
- - - resource
- - - - jon.gif
- - - - grav.gif
- - - - del.gif
- - - jonathan.java
- - - gravenstien.java
- - - delicious.java
- - oranges << the oranges module
- - - resource
- - - - nav.gif
- - - - sev.gif
- - - - sat.gif
- - - navel.java
- - - seville.java
- - - satsuma.java
My problem is that I can't get all the gif files copied into all
the right places during the build phase. For example, the
gravenstien.java file has a call to getClass.getResource
("grav.gif") which fails because the Build Java Resources phase
did not move the grav.gif file into the /build/..JavaClasses/
apples/resource directory (In fact it did not even create the
directory). The seville.java file has a similar call to
getResource("sev.gif"), but this call succeeds, because the
"oranges/resource" directory was properly copied into its proper
place in the build structure.
The build folder looks something like:
Fruit.app
- Fruit.build
- - JavaClasses
- - - apples
- - - - < no resource folder, this is the problem!!! >
- - - - gravenstien.class
- - - - jonathan.class
- - - - delicious.class
- - - oranges
- - - - resource
- - - - - nav.gif
- - - - - sev.gif
- - - - - sat.gif
- - - - navel.class
- - - - seville.class
- - - - satsuma.class
< plus pkg, javafiles, info, etc >
So, what gives? Why do some of my resources get properly copied
during the build, and some of them not? I have compared all the
project settings I can find, but can't figure whats going on. If
I just copy the apples/resource folder into the build directory
where it belongs (using th eFinder), the calls to getResource()
all succeed and the app works fine. Its just gettting the xcode
project to do that copying that is driving me nuts.
(In my real project, there are ten src folders, of which 3
contain image resource folders, and 2 of those image folders are
correctly copied; just one set of images fails to get copied.
Also, I inherited this project, and I think it was originally a
Project Builder project file.)
Paul
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40apple.com
This email sent to email@hidden
_______________________________________________
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