installing Java apps on the mac

Discussion in 'Java' started by Roedy Green, Feb 2, 2012.

  1. Roedy Green

    Roedy Green Guest

    What does a user have to do to run a jar on the Mac (other than JNLP),
    where you actually install the jar for continued use.
    --
    Roedy Green Canadian Mind Products
    http://mindprod.com
    One of the most useful comments you can put in a program is
    "If you change this, remember to change ?XXX? too".
     
    Roedy Green, Feb 2, 2012
    #1
    1. Advertising

  2. Roedy Green

    Rajiv Gupta Guest

    On 2012-02-02 16:28:28 +1100, Roedy Green said:

    > What does a user have to do to run a jar on the Mac (other than JNLP),
    > where you actually install the jar for continued use.


    Drag the .jar to the user's /Applications directory. Double-clicking
    the .jar will launch it. The jar doesn't actually have to be in
    /Applications it can be in any directory which has execute privileges
    for the user.
     
    Rajiv Gupta, Feb 3, 2012
    #2
    1. Advertising

  3. Roedy Green

    John Guest

    On Feb 2, 5:36 pm, Rajiv Gupta <> wrote:
    > On 2012-02-02 16:28:28 +1100, Roedy Green said:
    >
    > > What does a user have to do to run a jar on the Mac (other than JNLP),
    > > where you actually install the jar for continued use.

    >
    > Drag the .jar to the user's /Applications directory.  Double-clicking
    > the .jar will launch it.  The jar  doesn't actually have to be in
    > /Applications it can be in any directory which has execute privileges
    > for the user.


    Rajiv is correct, but here is some more info.

    Distribute your runnable jar file in a directory (folder), and have
    the user copy the
    directory to the applications folder. Include a command file in the
    directory
    worded something like:

    #!/bin/sh
    cd /Applications/YourDirectoryName
    /System/Library/Frameworks/JavaVM.framework/Version/1.6.0/Commands/
    java -cp ./YourJar.jar MainClassName

    Double clicking on this *.command file will attempt to launch your
    application using a version 1.6 virtual machine. If this doesn't work,
    then tell your user to double click on the jar file to try and launch
    it. This command file works with the older versions of Mac OS X, when
    it was installed as part of the operating system. I'm not sure how it
    is installed on the latest versions today.

    I'm not sure about the first line of the command file above. I'm at
    work on a Windows machine, and I can't test it.

    Hope this is useful,

    John
     
    John, Feb 3, 2012
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. aph
    Replies:
    4
    Views:
    439
    Peter Hansen
    Jan 14, 2006
  2. JKPeck
    Replies:
    3
    Views:
    870
    Benjamin Kaplan
    Mar 13, 2012
  3. anonymous

    Call windows apps from web apps

    anonymous, Feb 22, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    4
    Views:
    252
    anonymous
    Feb 28, 2005
  4. Richard Choate

    Web enabled apps/Thin client apps

    Richard Choate, Jul 23, 2003, in forum: ASP General
    Replies:
    2
    Views:
    321
    Chris Barber
    Jul 23, 2003
  5. Göktuğ Kayaalp
    Replies:
    0
    Views:
    131
    Göktuğ Kayaalp
    Oct 31, 2013
Loading...

Share This Page