Re: Java 3D in eclipse Mac OSX not functioning
Posted by everythingConnected on Feb 05, 2015; 3:18pm
URL: https://forum.jogamp.org/Java-3D-in-eclipse-Mac-OSX-not-functioning-tp4033010p4034004.html
Just tying to run it using a .command file so its double click-able. Its equivalent in Windows would basically be:
#!/bin/bash
java -jar MyJar.jar
This doesnt work in Mac world, seemingly as the script does not run in the directory it is currently in (same one as the jar), but in a home directory. Lots of info on google about such thing but any attempt to change its current directory doesnt seem to work to me using commands such as:
cd “$(dirname “$0”)” or cd “$(dirname “${BASH_SOURCE[0]}” )”
I can get the thing to run fine from the terminal window itself, but then I have navigated to the correct directory. Somehow the seemingly simple idea of double clicking a script file and having it execute in the directory it is in seems very complicated in Mac world...