[OSM-dev] which Java Verison to use (1.6 vs. 1.5); was: Error compiling osmosis
brett at bretth.com
Sat Dec 27 23:36:29 GMT 2008
Sending this to dev because I'm curious to hear thoughts from the JOSM guys.
I agree it would be nice to standardise but the reasons for the
difference as I understand it are:
JOSM is an end user tool where wide platform support is necessary. Java
1.5 is more widely available than Java 1.6. OSX in particular hasn't
had support for 1.6, not sure if that's changed yet. JOSM is
maintaining compatibility with Java 1.5. *However* it should be
possible to compile JOSM on Java 1.6, it just won't run on 1.5 if you do
so. There may be some warnings around the use of the @Override
annotation (I don't know the details here) but I don't think these
should be show stoppers.
Osmosis is newer than JOSM, and is less end-user focused. I don't
support 1.5 because I'm using some newer features of the 1.6 platform.
From memory, these are Java 2D libraries required for accurate polygon
support, concurrent libraries, and collection libraries. Of these it
might be possible to support 1.5 with some additional effort but the
polygon support in particular is hard to do properly on 1.5 because 1.6
added "double" accuracy 2D calculations.
Here's my suggestion. OpenJDK is a Java 1.6 platform. I assume that is
what Debian will provide out of the box. Compile both JOSM and Osmosis
using this 1.6 platform. They will both then run on the OpenJDK
provided by Debian. Neither will run on older 1.5 JDKs. You aren't
building binary distributions of JOSM for cross-platform use therefore
you don't need to support 1.5.
1.6 provides some very useful features, it has been released for around
2 years now, and is supported on the vast majority of platforms out
there. Supporting 1.5 just isn't a high priority for me. With the open
source OpenJDK out there I was hoping the need to support ancient java
releases would be eliminated.
Joerg Ostertag (OSM Tettnang/Germany) wrote:
> OK ...
> so josm doesn't want java 1.6
> and osmosis doesn't want java 1.5
> This doesn't really make it easy to create debian packages out of these ...
> Couldn't we agree on one Version of Java for all OSM Software. This would
> macke packaging much easier for me.
> On Mittwoch 24 Dezember 2008, you wrote:
>> The minimum required java version for osmosis is 1.6. You appear to be
>> using version 1.5.
More information about the dev