Can't locate my output img file from mkgmap

This is a follow up to my related blog of 5-DEC-14.

Following the procedure that worked 9 months ago when I initially could not find an img output file:

Running the mkgmap command line from START/run with my XP operating system exactly as before but including the mkgmap holding directory ahead of the command line I inexplicably cannnot repeat my successful generation of an img file.

Symptoms as before were:

  1. No problem selecting,exporting and renaming small OSM maps.
  2. I can install and unzip mkgmap.
  3. Placed the small map eg. testmap.OSM into the same folder as the unzipped mkgmap.jar.
  4. Have Java 7 Update 71 installed.
  5. I ‘run’ the command line ‘java -jar mkgmap.jar testmap.osm’ while the folder containing the two files is open.
  6. I saw a brief flash of a black screen (say one quarter of my computer screen) but no output file 63240001.img appearing in the active folder.
  7. Tried using IE snd FF browsers, three separate computers, OSM files as small as 70Mb(giving 1Mb img file), used both winzip and 7 Zip and switched off my Firewall, AVG and AdAware virus protection yet always get the same result. I also searched my computer for the missing 63240001’img file but there is not one present anywhere.
  8. Used file names less than 8 characters long.

Very frustrating! Any suggestions to this apparently ‘simple’ problem which has stopped me in my tracks, would be much appreciated.

Better make a batch file with two commands. Open notepad editor, copy the following lines, save it as mkgmap.bat and run it.
Then you can see what mkgmap is reporting.

java -jar mkgmap.jar testmap.osm
pause

Thank you for that prompt reply ligfietser. I have done as you suggest and get error: Unable to access jarfile mkgmap.jar. What next? Thanks.

You probably only copied the mkgmap.jar file, but you also need the subfolders from the mkgmap.zip file.

You were correct in that I had copied only the mkgmap.jar. I have now downloaded a fresh version of the latest mkgmap download and installed and unzipped it in a directory C:\MAPTEST2. With the opened folder C:\MAPTEST2\mkgmap-r3631\mkgmap-r3631 open, and viewing all of the subfiles/subfolders you mentioned I pasted in my map(2).osm map ie renamed the downloaded one as map(2).osm. When I now START>run C:\MAPTEST2\mkgmap-r3631\mkgmap-r3631 java -jar mkgmap.jar map(2).osm I still get no output file after 3mins - my output files last year usually appeared in 45secs.

I have run the batch file you kindly suggested to try and diagnose the problem with the same error message appearing ‘unable to access the jarfile mkgmap.jar’. I am determined to solve this problem so that I can move on to adjusting the style of my black/white Etrex 10 maps - notably to increase the ‘blackness’ of the breadcrumb track and decrease the ‘blackness’ of the ‘tree symbols’ so that I can view my tracks more easily in woods.

Thank you for your help so far - otherwise I would have been ‘lost’.

I dont know where you put mkgmap but maybe your path is incorrect:
C:\MAPTEST2\mkgmap-r3631\mkgmap-r3631

Better put the exact path in your batch file and run this batch file instead using a command from the start menu.


java -jar C:\MAPTEST2\mkgmap-r3631\mkgmap.jar map(2).osm
pause

When I unzip the mkgmap zip file a folder called mkgmap-r3631 appears in the same folder as the zip file. When I open this folder a sub folder also called mkgmap-r3631 is generated; when I open this folder I see mkgmap.jar and the other subfolders such as doc, examples and lib.

Consequently I amended the batch file you suggested to include the extra layer of mkgmap-r3631 and ran it as a batch file with the map file in the same folder as mkgmap.jar. This came up with a longer error message which indicated map(2).osm did not exist! So to check whether the map was corrupt I downloaded a fresh similar map via the overpass server and renamed it map(4).osm (size 220MB). Using this map(4).osm gave a similar error message ie this map does not exist. I would have expected map(4) to produce an image file of about 3.14MB.

The exact batch file that I ran was:

java -jar C:\MAPTEST2\mkgmap-r3631\mkgmap-r3631\mkgmap.jar map(4).osm
pause

Can you say why you have placed the 'java -jar ’ portion ahead of the directory path in this command please?

The directory path is needed to find mkgmap.jar because you apperently execute the batch file from a different location as your working files. Better copy your batch file in the same dir as map.osm and mkgmap.jar and execute it from there.

To run java you dont need to specify its location because windows already knows where it is stored. You can try to specify the exact path of your map.osm file as well, eg
java -jar C:\MAPTEST2\mkgmap-r3631\mkgmap-r3631\mkgmap.jar c:\MAPTEST2\mkgmap-r3631\mkgmap-r3631\map(4).osm

Thank you very much Liegfietser for your answers which make good sense to me. Ignoring the fact that I got the process to work 9 months ago some how or other - by luck I think - I have chosen to write a simple batch file, built as you have suggested using notepad and saved it to the same directory as that containing mkgmap.jar and map(4).osm and then executed it from that location. The result was an information window telling me the bat file was being proocessed and ca 40-45 sec later the required image files appeared in the same directory. Success at last!!

I guess everybody ‘understands’ programming logic differently but personally I find the process of creating a batch file in the same directory as the data it is processing, more logical and less open to mistakes. Needless to say I will be writing explicit step by step instructions down for my future reference in case I make other mistakes.

Thank you for your patience and knowledge of mkgmap in helping me through this frustrating episode.