Opened 13 years ago

Last modified 11 years ago

#8465 closed enhancement

Switch to Java 7 — at Version 27

Reported by: Don-vip Owned by: team
Priority: major Milestone: 14.05
Component: Core Version:
Keywords: java7 Cc:

Description (last modified by Don-vip)

Oracle has released their final public update of Java 6 (Update 43) and has implemented a "6 to 7" auto-update feature that will concern nearly all Windows and Mac users:

when updating from JRE 6, the update mechanism will not only install the latest version of JRE 7 but will also remove the highest version of JRE 6 on the system. This change will happen when the system is updated via the auto-update mechanism or by checking for updates directly from the Java Control Panel.

In the meanwhile, Linux distributions start to ship OpenJDK7 as their default implementation. Ubuntu ships Java 7 as default since version 12.10 (Quantal Quetzal).

Therefore, we will have soon a majority of users that will run JOSM with Java 7. Maybe it is already the case ? What are the current usage statistics ?

We have a couple of tickets that could benefit from switching to Java 7. I'm thinking at least to #7406, #7896 and #8098.

Java 7 ships also language improvements and some other features JOSM could use, mainly in parallelism, I/O and rendering:

However, there are some incompabilities that we must check carefully:

So, when do you think we could switch ?

Change History (26)

comment:1 by Don-vip, 13 years ago

Keywords: java7 added

comment:2 by bastiK, 13 years ago

recent stat:

Java Main Version --> 6 (1812, 44.1%) 7 (2294, 55.8%) 8 (4,  0.1%)

Maybe wait for the Win/Mac auto-update to kick in and see what numbers we have then.

comment:3 by stoecker, 13 years ago

We switched to Java 6 with less than 5% users using Java 5. So it is a long way to go :-)

comment:4 by Don-vip, 13 years ago

Ok thanks for the numbers:) Is there a way to publish them automatically on the website? By the way it's funny to see 4 people using JOSM with Java 8!

comment:5 by Don-vip, 13 years ago

Do we have OS marketshare stats among those running Java 6?

in reply to:  4 comment:6 by stoecker, 13 years ago

Replying to Don-vip:

Is there a way to publish them automatically on the website?

No. We wont do that.

By the way it's funny to see 4 people using JOSM with Java 8!

One time Russian, one time English, the other one German, probably counted twice.

Do we have OS marketshare stats among those running Java 6?

No. The user agent string does not contain that information.

comment:7 by Don-vip, 13 years ago

Description: modified (diff)

comment:8 by Don-vip, 13 years ago

Description: modified (diff)

comment:9 by Don-vip, 13 years ago

Replying to bastiK:

Maybe wait for the Win/Mac auto-update to kick in and see what numbers we have then.

One month later, we've gained 5%:

Java Main Version --> 6 (2771, 39.0%) 7 (4331, 60.9%) 8 (9,  0.1%)

comment:10 by skyper, 13 years ago

Debian 7 (wheezy) will still have openjdk-6 as default. Openjdk-7 is also available but it won't be installed automatically for the next two to three years.

comment:11 by stoecker, 13 years ago

Huh. Giving a daily calculated percentage a 5% accuracy is very dangerous :-) If I try hard enough I probably will find a day, where Java 6 gained 10%!

We should probably add the OS text to the User-Agent string, so we can do OS statistics in future.

in reply to:  11 comment:12 by Don-vip, 13 years ago

Replying to stoecker:

Huh. Giving a daily calculated percentage a 5% accuracy is very dangerous :-) If I try hard enough I probably will find a day, where Java 6 gained 10%!

You're right, Java 6 gained 5% on 20th March :) Daily stats are however quite stable around 40/60:

2013-03-18: Java Main Version --> 6 (659, 37.5%) 7 (1094, 62.3%) 8 (2,  0.1%)
2013-03-19: Java Main Version --> 6 (903, 43.4%) 7 (1174, 56.4%) 8 (4,  0.2%)
2013-03-20: Java Main Version --> 6 (1227, 49.6%) 7 (1245, 50.3%) 8 (2,  0.1%)
2013-03-21: Java Main Version --> 6 (773, 43.2%) 7 (1014, 56.7%) 8 (1,  0.1%)
2013-03-22: Java Main Version --> 6 (747, 39.8%) 7 (1126, 60.0%) 8 (3,  0.2%)
2013-03-23: Java Main Version --> 6 (625, 37.9%) 7 (1022, 62.0%) 8 (1,  0.1%)
2013-03-24: Java Main Version --> 6 (540, 34.7%) 7 (1014, 65.1%) 8 (3,  0.2%)
2013-03-25: Java Main Version --> 6 (779, 40.9%) 7 (1122, 58.9%) 8 (3,  0.2%)
2013-03-26: Java Main Version --> 6 (823, 41.0%) 7 (1181, 58.8%) 8 (3,  0.1%)
2013-03-27: Java Main Version --> 6 (676, 38.1%) 7 (1097, 61.8%) 8 (1,  0.1%)
2013-03-28: Java Main Version --> 6 (767, 40.6%) 7 (1117, 59.2%) 8 (3,  0.2%)

We should probably add the OS text to the User-Agent string, so we can do OS statistics in future.

OK, I will look into it :)

in reply to:  10 ; comment:13 by Don-vip, 13 years ago

Replying to skyper:

Debian 7 (wheezy) will still have openjdk-6 as default. Openjdk-7 is also available but it won't be installed automatically for the next two to three years.

People using Debian usually know how to install another package ;) I won't see this as a problem when more than 95% of our users will use Java 7, even if default Debian Java remains stucked to version 6.

in reply to:  13 comment:14 by skyper, 13 years ago

Replying to Don-vip:

Replying to skyper:

Debian 7 (wheezy) will still have openjdk-6 as default. Openjdk-7 is also available but it won't be installed automatically for the next two to three years.

People using Debian usually know how to install another package ;) I won't see this as a problem when more than 95% of our users will use Java 7, even if default Debian Java remains stucked to version 6.

Don't forget that user does not always have admin rights nor might he/she an admin at all.
The figures above almost level up at 50:50 on active days and power user seem to use java7.

comment:15 by stoecker, 13 years ago

I added a java version check to start page. Maybe that helps to increase Java 7 usage.

The OS-Stats check work now:

4 Linux 
2 Mac OS X 
2 Windows 7 

I knew Linux has more than 50% of the market.

comment:16 by Don-vip, 13 years ago

haha :D

comment:17 by stoecker, 13 years ago

Can someone check if the java test works? I don't find any java 6 system ATM. All updated already.

in reply to:  17 comment:18 by Don-vip, 13 years ago

Replying to stoecker:

Can someone check if the java test works? I don't find any java 6 system ATM. All updated already.

I don't understand why you have removed the User-Agent code ? How is it set then ?

EDIT: it works:

U          2 JOSM/1.5 (5819 SVN en_GB) Windows 8 Java/1.6.0_43
Last edited 13 years ago by Don-vip (previous) (diff)

comment:19 by stoecker, 13 years ago

I don't understand why you have removed the User-Agent code ? How is it set then ?

In Preferences.java we set http.agent property. Java adds its version and uses this as User-Agent. Directly setting User-Agent strips the Java version.

comment:21 by Don-vip, 13 years ago

As seen in #8488 comments, we have a problem with people living in countries subject to U.S. export regulations (Cuba, Iran, North Korea, Sudan, and Syria).

Oracle has blocked Java updates to Iran, I think we can assume it's the same for other countries. Those people will remain stuck with Java 6 if they have not already updated their version :(

comment:23 by Don-vip, 13 years ago

Nice. In the meanwhile we begin to have more OS marketshare, with some unexpected OS:

O          2 FreeBSD
O        384 Linux
O         30 Mac OS X
O          2 SunOS
O        202 Windows 7
O         32 Windows 8
O          2 Windows Server 2008 R2
O         22 Windows Vista
O         58 Windows XP

Among "latest" users, that makes 52% Linux, 43% Windows, 4% Mac OS, 1% others (did not think to see Solaris or Windows Server users).

We'll see next week if the release of tested version changes these numbers significantly or not.

comment:24 by stoecker, 13 years ago

Either our startup notice or Oracles update policy works, but it seems Java 7 usage increases. We're at about 70% now.

With tested release Windows gained a bit with 55%, Linux about 40%. Pretty interesting :-)

comment:25 by Don-vip, 13 years ago

Oracle just released a brand "new final" release of Java 6: 6 update 45, alongside the last update of Java 7: 7 update 21

in reply to:  25 comment:26 by Don-vip, 13 years ago

FYI, Oracle switched to a weird renumbering scheme:

The next Limited Update for JDK 7 will be numbered 7u40, and the next 3 CPUs after that will be numbered 7u45, 7u51, and 7u55. The next release will be a Limited Update 7u60, followed by CPUs 7u65, 7u71, and 7u75.

7u40 is expected in August 2013 and might bring a bunch of new features:

  • Java Flight Recorder in JDK
  • Native memory tracking
  • Java Discovery Protocol
  • App Store Packaging Tools
  • JAXP 1.5
Last edited 13 years ago by Don-vip (previous) (diff)

comment:27 by Don-vip, 13 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.