Results 1 to 2 of 2
  1. #1
    Prasannaa is offline Member
    Join Date
    Aug 2008
    Posts
    1
    Rep Power
    0

    Default 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

  2. #2
    skaspersen is offline Member
    Join Date
    Jul 2008
    Posts
    31
    Rep Power
    0

    Default

    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
    Stephen
    Last edited by skaspersen; 08-07-2008 at 04:06 PM. Reason: typo

Similar Threads

  1. Reading Integers from a text file
    By tress in forum New To Java
    Replies: 6
    Last Post: 02-26-2011, 06:45 PM
  2. [SOLVED] Reading a text file into an Array
    By DonCash in forum New To Java
    Replies: 13
    Last Post: 01-25-2011, 01:51 AM
  3. Reading a properties file using resource bundle.
    By rudrakanth in forum New To Java
    Replies: 1
    Last Post: 02-27-2009, 01:23 PM
  4. Reading two text file and sum them up
    By matt_well in forum New To Java
    Replies: 36
    Last Post: 07-22-2008, 03:55 AM
  5. Reading text file
    By Lennon-Guru in forum New To Java
    Replies: 1
    Last Post: 12-16-2007, 12:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •