Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #11768
| From | John <stledger@lanl.gov> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: installing Java apps on the mac |
| Date | 2012-02-03 11:08 -0800 |
| Organization | http://groups.google.com |
| Message-ID | <347aa912-489e-4203-8e81-e9b86f0f3039@v14g2000vbc.googlegroups.com> (permalink) |
| References | <el7ki7tnuhs4030mqb8a36pjq5ehfvi2rj@4ax.com> <jgfa67$nb1$1@speranza.aioe.org> |
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 | Next — Previous in thread | Find similar | Unroll 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