• 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
Java Resource Files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Java Resource Files


  • Subject: Java Resource Files
  • From: Tim Christensen <email@hidden>
  • Date: Tue, 09 Dec 2003 12:40:08 -0700

I have been using Project Builder for a few years, exclusively for Java
development on OS X. I have built a number of applications using Swing.

In trying to switch over to Xcode, I cannot figure out how to set the
destination subdirectory of resource files.

For example since I generally have a single source code directory from which
I build applications, I will usually have something like this in my project:

package.images --> folder containing images and imported into my project
package.resources --> folder containing text files such as properties files,
xml files etc.

(Most of my applications deploy as JNLP apps so I must have all my files
packed into a single .jar file and using a classloader to pull them out of
the .jar package)

Project builder was slick at handling this... Anytime I added a new resource
file (or rather a non-source code file) I would go and edit the target of
the project:

Build Phases --> Java Resource Files --> Shows me a list of files

In the list of files I change the destination subdirectory to the package
url, Project Builder automatically packs them into the .jar for me.

Why is it like this -- I work from a shared source code directory outside of
the project directory so a file may have a 'true' location like this:

user/tim/projects/source/com/vanns/apps/images/image.jpg

And I am placing it in a .jar file with a package and folder hierarchy like
this:

com/vanns/apps/images/image.jpg

I hope this has not been addressed before. I have been working on this
problem for some time. Perhaps I am missing something very simple. It may be
possible I am not solving the problem the correct way in the first place --
any hints are welcome too.

The bottom-line, how do I use Xcode to build a Java application, and have
all the files - obviously source, as well as resource - packed into a single
.jar file automatically.

Thanks,

Tim Christensen
Vanns.com Inc.
http://www.vanns.com
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Java Resource Files
      • From: Steve Roy <email@hidden>
  • Prev by Date: Re: beginner's xcode question
  • Next by Date: Debugging Installer/PackageMaker failures
  • Previous by thread: Re: gdb console inactive
  • Next by thread: Re: Java Resource Files
  • Index(es):
    • Date
    • Thread