You are not logged in.

#1 2014-03-26 02:21:07

nevw
Member
From: SE Queensland, Australia
Registered: 2013-04-11
Posts: 416

mkgmap & Unsupported major.minor version 51.0

Hi
After editing late in the day, I am trying to make a new map to load on my eTrex that highlights the remaining un-named ways for the next day, using mkgmap and a download of an .osm file using Josm of part of a suburb, using the following command as an initial trial.

java -jar /Applications/mkgmap-r3118/mkgmap.jar --gmapsupp --style=noname /Users/xxxx/Documents/JOSM/Save_OSM_file/nonametest.osm

and I get the following advice...

Exception in thread "main" java.lang.UnsupportedClassVersionError: uk/me/parabola/mkgmap/main/Main : Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

I assume a version incompatibility with mkgmap and my java version

java -version
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-10M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)

I can't run java 1.7 on this machine (would it help if I used a later mac that could?)

iMac7,1
System Version:    Mac OS X 10.6.8 (10K549) Snow Leopard
Kernel Version:    Darwin 10.8.0

I also tried these commands with the same result...
java -jar /Applications/mkgmap-r3118/mkgmap.jar --list-styles
java -jar /Applications/mkgmap-r3118/mkgmap.jar --version

I would appreciate a point in the next direction please...
Nev

Edit:
Does the info below confirm that I must run java 7 for mkgmap?

major version number of the class file format being used.
J2SE 8 = 52 (0x34 hex),
J2SE 7 = 51 (0x33 hex),
J2SE 6.0 = 50 (0x32 hex),
J2SE 5.0 = 49 (0x31 hex),
JDK 1.4 = 48 (0x30 hex),
JDK 1.3 = 47 (0x2F hex),
JDK 1.2 = 46 (0x2E hex),
JDK 1.1 = 45 (0x2D hex).

Further Edit:

...belatedly found this http://wiki.openstreetmap.org/wiki/Mkgmap/help/usage

Pre-Requisites

You need to download the following software / tools:

    Java Runtime Environment 1.7 from http://www.java.com
    mkgmap
    splitter

Install Java Runtime Environment 1.7. Both mkgmap and splitter depend upon it.

That seems plain enough even for me now - I must have a later Java version installed and this can't be done on this machine?
Is it likely that the developers of mkgmap will recompile a version of the program in the near future so that it runs under java 1.6?

Last edited by nevw (2014-03-26 04:45:35)

Offline

#2 2014-03-26 09:39:25

ligfietser
Member
Registered: 2008-10-09
Posts: 5,233
Website

Re: mkgmap & Unsupported major.minor version 51.0

As far as I know Java 1.6 isnt supported anymore, better ask it on the mkgmap development list:
http://www.mkgmap.org.uk/dev/maillist

Offline

Board footer

Powered by FluxBB