Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

johnh57

macrumors regular
Original poster
Jul 6, 2011
130
30
Montana
Trying to download and install Mobile Atlas Creator. It comes with an executable script file to execute the program. When I run the start.sh file, it just opens up the text editor and blinks at me. This is what it is now:

#!/bin/sh

java -Xmx512M-jar Mobile_Atlas_Creator.jar

# This file will start the Mobile Atlas Creator with custom memory settings for
# the JVM. With the below settings the heap size (Available memory for the application)
# will range from 64 megabyte up to 512 megabyte.

it is supposed to run the .jar file - if I run that manually by clicking on it, it says I should run it from the start file and I need to have a "-Xmx512M" key on the start command. I edited the command line to include the key - but it ignores it. Obviously I am pretty clueless about java/linux.

john
 
you need a space between M and -:
Code:
#!/bin/sh

java -Xmx512M -jar Mobile_Atlas_Creator.jar
Trying to download and install Mobile Atlas Creator. It comes with an executable script file to execute the program. When I run the start.sh file, it just opens up the text editor and blinks at me. This is what it is now:

#!/bin/sh

java -Xmx512M-jar Mobile_Atlas_Creator.jar

# This file will start the Mobile Atlas Creator with custom memory settings for
# the JVM. With the below settings the heap size (Available memory for the application)
# will range from 64 megabyte up to 512 megabyte.

it is supposed to run the .jar file - if I run that manually by clicking on it, it says I should run it from the start file and I need to have a "-Xmx512M" key on the start command. I edited the command line to include the key - but it ignores it. Obviously I am pretty clueless about java/linux.

john
 
It still just opens the file in a text editor with the curser flashing in front of the #!/bin/sh line.

Do I need to do something with a chmod command? (and if so, exactly how?) sorry for being so dense, but I grew up using the 'other' system.

john
 
It still just opens the file in a text editor with the curser flashing in front of the #!/bin/sh line.

Do I need to do something with a chmod command? (and if so, exactly how?) sorry for being so dense, but I grew up using the 'other' system.

john

Ahh, in the terminal type

Code:
chmod +x

with a trailing space. Then drag the file from the finder into the terminal. This should enter its absolute path in there for you. Press enter, and try double clicking again.
 
this is what terminal looks like

Last login: Thu Oct 27 09:39:03 on console
Linda-Hightowers-MacBook-Pro:~ johnhightower$
Linda-Hightowers-MacBook-Pro:~ johnhightower$ chmod +x /Applications/Mobile\ Atlas\ Creator\ 1/start.sh
Linda-Hightowers-MacBook-Pro:~ johnhightower$

double clicking on the start.sh file in the mobil atlas application folder still results in the start sh script file opening in the text editor.

jh
 
Hmmm, I'm not sure how to get it to execute by clicking on it. You can, of course path to the location in terminal and type ./start.sh, but that is obviously not what you want to do. A little searching indicates that perhaps you can possibly rename it from start.sh to start.command.

Try that...sorry I dont have much experience in making scripts clickable!



this is what terminal looks like

Last login: Thu Oct 27 09:39:03 on console
Linda-Hightowers-MacBook-Pro:~ johnhightower$
Linda-Hightowers-MacBook-Pro:~ johnhightower$ chmod +x /Applications/Mobile\ Atlas\ Creator\ 1/start.sh
Linda-Hightowers-MacBook-Pro:~ johnhightower$

double clicking on the start.sh file in the mobil atlas application folder still results in the start sh script file opening in the text editor.

jh
 
That might be getting closer - still doesn't quite get there.

ast login: Thu Oct 27 23:09:26 on ttys000
Linda-Hightowers-MacBook-Pro:~ johnhightower$ /Applications/Mobile\ Atlas\ Creator\ 1/start.command ; exit;
Unable to access jarfile Mobile_Atlas_Creator.jar
logout

[Process completed]


it is at least trying to find the Mobile Atlas Creater.jar file.

downloading the program ( zip file) and dragging the resulting zip file into the applications folder resulted in this file structure: (I renamed the start.sh file to start.command file)

atlases (this is a folder)
CHANGELOG.txt
gpl.txt
mapsources (this is a folder)
mobac-profile-Google Maps New York.xml
mobac-profile.xml
Mobile Atlas Creator.exe
Mobile_Atlas_Creator.jar
README.HTM
ReleaseNotes.txt
settings.xml
sqlitejdbc-v056.jar
start.command
tilestore (this is a folder)
 
Ok, I would have expected it to execute the commands from the directory in which is resides, but perhaps it isn't. Try this, edit your start.command to look like this:


Code:
#!/bin/sh

java -Xmx512M -jar /Applications/Mobile\ Atlas\ Creator\ 1/Mobile_Atlas_Creator.jar

# This file will start the Mobile Atlas Creator with custom memory settings for
# the JVM. With the below settings the heap size (Available memory for the application)
# will range from 64 megabyte up to 512 megabyte.

That might be getting closer - still doesn't quite get there.

ast login: Thu Oct 27 23:09:26 on ttys000
Linda-Hightowers-MacBook-Pro:~ johnhightower$ /Applications/Mobile\ Atlas\ Creator\ 1/start.command ; exit;
Unable to access jarfile Mobile_Atlas_Creator.jar
logout

[Process completed]


it is at least trying to find the Mobile Atlas Creater.jar file.

downloading the program ( zip file) and dragging the resulting zip file into the applications folder resulted in this file structure: (I renamed the start.sh file to start.command file)

atlases (this is a folder)
CHANGELOG.txt
gpl.txt
mapsources (this is a folder)
mobac-profile-Google Maps New York.xml
mobac-profile.xml
Mobile Atlas Creator.exe
Mobile_Atlas_Creator.jar
README.HTM
ReleaseNotes.txt
settings.xml
sqlitejdbc-v056.jar
start.command
tilestore (this is a folder)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.