Results 1 to 5 of 5
  1. #1
    igorland is offline Member
    Join Date
    Jan 2013
    Posts
    89
    Rep Power
    0

    Default Creating Mac bundle with a jar file and external folders and libraries

    Hello.

    I have built my Java application and am trying to bundle it for using on Mac.

    This is how the distribution folder looks like:

    screenshot.png

    Can anyone help me create a Mac bundle? I have been trying to figure out how to use javapackager, but unfortunately I could not find any clear documentation on how to use it with dynamically linked external libraries and supplementary folders.

    If someone could point me in the right direction, I would greatly appreciate it.

    Thanks!

  2. #2
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    6,226
    Rep Power
    13

    Default Re: Creating Mac bundle with a jar file and external folders and libraries

    I do no use Macs but I would think the internals of a Jar file should be portable across platforms. You need to include an entry point so your JVM will kno which class file has the main static method. Check out Jar Files for more details. The section JAR Files as applications should be what you want. If you still have problems, I or some others should be able to help.

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  3. #3
    igorland is offline Member
    Join Date
    Jan 2013
    Posts
    89
    Rep Power
    0

    Default Re: Creating Mac bundle with a jar file and external folders and libraries

    Thank you, Jim. There are a few reasons why I want to package my application into a bundle for Mac. One of them, for example, is that I cannot change the application icon on the jar file. I found an application called AppMaker_2. It created a bundle for me. Now, I faced another problem. Whereas it sees my external libraries put in folder lib inside the bundle, it does not read from or write to any of my config or text files no matter if I put them inside the bundle or in the folder where the bundle is located. ((( Please, someone!

  4. #4
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    20,001
    Rep Power
    33

    Default Re: Creating Mac bundle with a jar file and external folders and libraries

    Can you add some print statements for debugging?
    Print out the value of the paths to the files you are trying to read to see where the program is looking.
    If you don't understand my response, don't ignore it, ask a question.

  5. #5
    igorland is offline Member
    Join Date
    Jan 2013
    Posts
    89
    Rep Power
    0

    Default Re: Creating Mac bundle with a jar file and external folders and libraries

    OK, I have resolved it. The problem was in the AppMaker application. I have figured out how to use javapackager to create an app bundle or even an installer. The result is perfect! If someone has questions regarding javapackager, feel free to ask.

Similar Threads

  1. Replies: 3
    Last Post: 08-04-2016, 05:46 PM
  2. Replies: 10
    Last Post: 09-13-2013, 08:41 PM
  3. Compiling with external libraries
    By sublixt in forum New To Java
    Replies: 5
    Last Post: 05-04-2012, 06:17 PM
  4. Replies: 1
    Last Post: 11-04-2009, 02:45 AM
  5. Replies: 1
    Last Post: 08-07-2007, 04:41 AM

Tags for this Thread

Posting Permissions

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