Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (523)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (592)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Double-clickable java application on Mac OSX  (Read 1588 times)
0 Members and 1 Guest are viewing this topic.
Offline Alfryd

Junior Devvie





« Posted 2010-02-27 22: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

Junior Devvie


Medals: 2



« Reply #1 - Posted 2010-02-27 23: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
« Reply #2 - Posted 2010-02-27 23: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! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #3 - Posted 2010-02-28 00: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
Offline Mr. Gol

Senior Devvie


Medals: 1



« Reply #4 - Posted 2010-02-28 10: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

Junior Devvie





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

Thanks a lot for the help (sorry about the delay in replying.)
Offline gouessej
« Reply #6 - Posted 2010-03-19 13:42:44 »

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

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

SHC (22 views)
2014-11-25 12:00:59

SHC (20 views)
2014-11-25 11:53:45

Norakomi (18 views)
2014-11-25 11:26:43

Gibbo3771 (22 views)
2014-11-24 19:59:16

trollwarrior1 (36 views)
2014-11-22 12:13:56

xFryIx (74 views)
2014-11-13 12:34:49

digdugdiggy (52 views)
2014-11-12 21:11:50

digdugdiggy (46 views)
2014-11-12 21:10:15

digdugdiggy (41 views)
2014-11-12 21:09:33

kovacsa (67 views)
2014-11-07 19:57:14
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!