Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #11768

Re: installing Java apps on the mac

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!news.glorb.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!v14g2000vbc.googlegroups.com!not-for-mail
From John <stledger@lanl.gov>
Newsgroups comp.lang.java.programmer
Subject Re: installing Java apps on the mac
Date Fri, 3 Feb 2012 11:08:11 -0800 (PST)
Organization http://groups.google.com
Lines 37
Message-ID <347aa912-489e-4203-8e81-e9b86f0f3039@v14g2000vbc.googlegroups.com> (permalink)
References <el7ki7tnuhs4030mqb8a36pjq5ehfvi2rj@4ax.com> <jgfa67$nb1$1@speranza.aioe.org>
NNTP-Posting-Host 132.3.53.68
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
X-Trace posting.google.com 1328296434 3129 127.0.0.1 (3 Feb 2012 19:13:54 GMT)
X-Complaints-To groups-abuse@google.com
NNTP-Posting-Date Fri, 3 Feb 2012 19:13:54 +0000 (UTC)
Complaints-To groups-abuse@google.com
Injection-Info v14g2000vbc.googlegroups.com; posting-host=132.3.53.68; posting-account=is92IAoAAAAyj17mr4XXQBDgnFK66iOH
User-Agent G2/1.0
X-Google-Web-Client true
X-Google-Header-Order ARLUEHCNK
X-HTTP-UserAgent Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; InfoPath.2; .NET4.0C; .NET4.0E),gzip(gfe)
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:11768

Show key headers only | View raw


On Feb 2, 5:36 pm, Rajiv Gupta <ra...@invalid.com> 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

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

installing Java apps on the mac Roedy Green <see_website@mindprod.com.invalid> - 2012-02-01 21:28 -0800
  Re: installing Java apps on the mac Rajiv Gupta <rajiv@invalid.com> - 2012-02-03 11:36 +1100
    Re: installing Java apps on the mac John <stledger@lanl.gov> - 2012-02-03 11:08 -0800

csiph-web