Java-Gaming.org
Java4K - to go         Javadoc:
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources, peek at the official java tutorials or join us at irc #jgo.
 
    Home     Help   Search   Login   Register   
Pages: [1]
  Print  
  Double-clickable java application on Mac OSX  (Read 768 times)
0 Members and 1 Guest are viewing this topic.
Offline Alfryd

Jr. Member
**

Posts: 92



« on: 2010-02-27 17:51:49 »

Like it says- I want to be able to double-click on *something* and have it execute my java app.
I do *NOT* want to use webstart OR .jar files.  They've caused me too much damn pain, because webstart is complicated and .jar files, in my experience, do not play nice with native libraries (they expect them to be in the same directory.)
I *DO* want to be able to move the directory containing the executable and class files around (because I want to distribute this to other users.)
I *DO* want to be able to put the executable in a different directory from the root directory for the java classpath (because I don't want users to be confused by a dozen other icons in the same folder.)


Basically, what I was going to use was a simple .command file:
1  
2  
cd MyGameDirectory
java -cp .:lwlgl.jar:lwjgl_util.jar:lwjgl-debug.jar rep.game.GameTest


...But a .command file insists on absolute, rather than relative pathnames, so that doesn't work, and I can't move around the directory if I *do* use absolute pathnames.

Anyways- any help would be appreciated.
Offline Momoko_Fan

Full Member
**

Posts: 100
Medals: 3



« Reply #1 on: 2010-02-27 18:30:48 »

Maybe you can include everything (natives, data, libs) in the jar file and then have it unpack the natives. This is how jME3 does it and no-one is having issues with it so far.
Offline jezek2

Sr. Member
**

Posts: 354
Medals: 3



« Reply #2 on: 2010-02-27 18:32:47 »

Use application bundle which is a standard way to store and launch applications on Mac OS X. You can create it manually and use eg. bash script for your executable, or use Jar Bundler application for creation of one automatically. I think you have to install developer tools (XCode) to have Jar Builder application, you can download it from Apple (it might be also included on some of OSX install discs).

As for distribution, the most preferrable way is to use *.dmg files, you can create them using Disk Utility. Alternatively you can also use *.zip or *.tbz (*.tar.bz2).
Games published by our own members! Go get 'em!
Offline Eli Delventhal
« League of Dukes »

JGO Kernel
*****

Posts: 3478
Medals: 39


Game Engineer


« Reply #3 on: 2010-02-27 19:19:06 »

Use application bundle which is a standard way to store and launch applications on Mac OS X. You can create it manually and use eg. bash script for your executable, or use Jar Bundler application for creation of one automatically. I think you have to install developer tools (XCode) to have Jar Builder application, you can download it from Apple (it might be also included on some of OSX install discs).

As for distribution, the most preferrable way is to use *.dmg files, you can create them using Disk Utility. Alternatively you can also use *.zip or *.tbz (*.tar.bz2).
Yup, this is the same way I do it. Works very well. I can send you the application if you want, rather than forcing you to download the whole like 3GB of developer tools.

See my work:
OTC Software
<br />
Currently Working On:
Secret project...
Quote from: _Riven
I edit JGO in production, because I simply don't waste time writing bugs
Offline Mr. Gol

Full Member
**

Posts: 213
Medals: 1



« Reply #4 on: 2010-02-28 05:21:28 »

More information about application bundles specifically aimed at Java developers: http://developer.apple.com/mac/library/documentation/Java/Conceptual/Java14Development/03-JavaDeployment/JavaDeployment.html#//apple_ref/doc/uid/TP40001885.
Offline Alfryd

Jr. Member
**

Posts: 92



« Reply #5 on: 2010-03-18 15:36:19 »

Thanks a lot for the help (sorry about the delay in replying.)
Offline gouessej

JGO Kernel
*****

Posts: 3433
Medals: 26


TUER


« Reply #6 on: 2010-03-19 09:42:44 »

Java Web Start is not complicated and you could use IzPack to have a very clean and professional installer.

Julien Gouesse
Pages: [1]
  Print  
 
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.15 seconds with 21 queries.