Results 1 to 2 of 2
- 08-07-2008, 02:33 PM #1
Member
- Join Date
- Aug 2008
- Posts
- 1
- Rep Power
- 0
Reading a zip/text file present in a MAC Bundle
Hi All,
Do any one know how to read a file which is present inside a
MAC Bundle/app?.
I have a java application/bundle on MAC. The requirement is to read
a zip file which is present inside that bundle.
I tried ZIPFIle and ZipEntry etc , but they all throwed
FileNotFoundException. as the path is something like
"/app_name.app/contents/resources/file.zip"
Has anyone encountered this before?
Thanks ,
Prasannaa
- 08-07-2008, 03:05 PM #2
Member
- Join Date
- Jul 2008
- Posts
- 31
- Rep Power
- 0
Add the following to your Info.plist file
[code]
<key>Java</key>
<dict>
...
...
<key>WorkingDirectory</key>
<string>$APP_PACKAGE/Contents/Resources/</string>
</dict>
[code]
The file can then be accessed as new File("file.zip");
HTH
StephenLast edited by skaspersen; 08-07-2008 at 03:06 PM. Reason: typo
Similar Threads
-
Reading Integers from a text file
By tress in forum New To JavaReplies: 6Last Post: 02-26-2011, 05:45 PM -
[SOLVED] Reading a text file into an Array
By DonCash in forum New To JavaReplies: 13Last Post: 01-25-2011, 12:51 AM -
Reading a properties file using resource bundle.
By rudrakanth in forum New To JavaReplies: 1Last Post: 02-27-2009, 12:23 PM -
Reading two text file and sum them up
By matt_well in forum New To JavaReplies: 36Last Post: 07-22-2008, 02:55 AM -
Reading text file
By Lennon-Guru in forum New To JavaReplies: 1Last Post: 12-15-2007, 11:38 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks