Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / CodeWarrior / November 2004



Tip: Looking for answers? Try searching our database.

adding non-java files to jar file

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jeffrey W Percival - 30 Nov 2004 17:04 GMT
I've been trying futilely to add some text files to my jar file using CW
for the Mac (a Java app).

My intent is to supply a data file in my jar file, that my Java app can
read when it runs.  I've added a file mapping for my file (.txt), and
added it to my project, but after a make, the jar file doesn't contain my
data file.  How do I include non-java files in my jar file?

-Jeff

-----------------------------------------------------------
Jeffrey W Percival, Senior Scientist and Associate Director
Space Astronomy Laboratory, University of Wisconsin - Madison
1150 University Ave, Madison, WI 53706 USA
608-262-8686 (fax 608-263-0361) jwp at sal.wisc.edu
bolsinga@hotmail.com - 30 Nov 2004 17:58 GMT
>I've been trying futilely to add some text files to my jar file using CW
>for the Mac (a Java app).
[quoted text clipped - 3 lines]
>added it to my project, but after a make, the jar file doesn't contain my
>data file.  How do I include non-java files in my jar file?

I think you need to mark them as resources. I forget how to do that.
MW Ron - 30 Nov 2004 21:06 GMT
In article
<Pine.LNX.4.44.0411301101480.12488-100000@maddog.sal.wisc.edu>,

>I've been trying futilely to add some text files to my jar file using CW
>for the Mac (a Java app).
[quoted text clipped - 3 lines]
>added it to my project, but after a make, the jar file doesn't contain my
>data file.  How do I include non-java files in my jar file?

For resources you use the project inspector and select Merge into Output

Ron
>-----------------------------------------------------------
>Jeffrey W Percival, Senior Scientist and Associate Director
>Space Astronomy Laboratory, University of Wisconsin - Madison
>1150 University Ave, Madison, WI 53706 USA
>608-262-8686 (fax 608-263-0361) jwp at sal.wisc.edu

Signature

Metrowerks Community Forum is a free online resource for developers
to discuss CodeWarrior topics with other users and Metrowerks' staff
       --   http://www.metrowerks.com/community  --

Ron Liechty - MWRon@metrowerks.com - http://www.metrowerks.com

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.