The State of Java in 2018 – 2018年的Java现状

最后修改: 2018年 4月 28日

中文/混合/英文(键盘快捷键:t)

I’ve been running the yearly “State of Java” survey for the last couple of weeks. It’s the 5th year of the survey and naturally the largest one yet, with 5160 developers taking the time to go through and answer.

在过去的几周里,我一直在进行每年一次的 “Java现状 “调查。这是该调查的第5年,自然也是规模最大的一次,有5160名开发者花时间进行调查和回答。

Let’s jump right into the data.

让我们直接跳到数据上。

1. Java Adoption

1.采用java

Not surprisingly, Java 8 is still used in production by the majority of the development community:

The adoption of Java 9 and 10 is still quite low, sitting at less than 5%.

毫不奇怪,Java 8仍然被大多数开发社区用于生产:

Java 9和10的采用率仍然相当低,只有不到5%。

For reference, in 2017, the numbers for Java 7 and earlier were about 24.4% and they’re now 10.6% – so the ecosystem is clearly upgrading, mostly to Java 8.

作为参考,在2017年,Java 7和更早的数字约为24.4%,现在是10.6%–所以生态系统显然正在升级,主要是升级到Java 8。

2. Spring Adoption

2.Spring领养

Let’s now have a look at the Spring numbers:

Here, the move to Spring 5 is clear, with 24% of Spring-backed systems running on the latest version in production, up from a very early 2.2% last year.

现在让我们来看看Spring的数字:

在这里,转向Spring 5的趋势很明显,24%的Spring支持的系统在生产中运行在最新的版本上,比去年很早的2.2%有所提高。

And, of course, this year we also have clear Java EE numbers, since – believe it or not – not everyone is using Spring 🙂

当然,今年我们也有明确的Java EE数字,因为–信不信由你–不是每个人都在使用Spring 🙂

3. Spring Boot Adoption

3.采用Spring Boot

Out of the systems that are built with Spring, almost all of them are also using Boot in production:

在用Spring构建的系统中,几乎所有的系统也都在生产中使用Boot:

What’s surprising here is just how quickly Spring Boot 2 is getting adopted, considering the GA came out not even 2 months ago and it’s already sitting at a whopping 30% adoption.

令人惊讶的是Spring Boot 2的采用速度之快,考虑到GA出台还不到2个月,它的采用率已经达到了30%。

The “Boot 1.4 and older” fell from 30% a year ago, to 6.8% now, which means that the Boot crowd moves and upgrades a lot quicker than the broader ecosystem.

Boot 1.4及以上版本 “从一年前的30%下降到现在的6.8%,这意味着Boot人群的移动和升级比更广泛的生态系统要快得多。

Finally, last year, about 30.2% of Spring-based applications were just using the core framework, but not Boot; now, that number is only 16.7%. Simply put, most Spring applications are now using Boot. 

最后,去年,大约有30.2%的基于Spring的应用程序只是使用了核心框架,而没有使用Boot;现在,这个数字只有16.7%。简单地说,大多数Spring应用程序现在都在使用Boot。

4. Build Tools Adoption

4.建设工具的采用

Maven isn’t going anywhere. The tool was sitting at a comfortable 75.7% last year, and it commands 74.2% of the market now:

Maven并没有消失。去年,该工具在市场上的占有率为75.7%,而现在它的市场占有率为74.2%。

As for Gradle, it clawed a bit more of the market, mostly from Ant, and now has just shy of 1/5 of the market – 21.3%.

至于Gradle,它从Ant手中夺取了更多的市场,现在仅有接近1/5的市场 – 21.3%。

5. IDE Adoption

5.集成开发环境的采用

The IDE numbers are always interesting, and this year is no different:

IntelliJ grew from 45.8% in 2017 to whopping 55.4% today, clearly winning the IDE battle in the Java space this year.

IDE的数字总是很有趣,今年也不例外:

IntelliJ从2017年的45.8%增长到现在的高达55.4%,显然在今年的Java领域的IDE之战中获胜。

NetBeans, to the dismay of a few very vocal supporters, fell to 5.1% this year, which is less than half of the 12.4% numbers of 2017.

NetBeans,让一些非常有发言权的支持者感到失望,今年下降到5.1%,这还不到2017年12.4%数字的一半。

And Eclipse looks to have somewhat stopped the bleeding and fell just 2% over the course of this year, to 38% of the market.

而Eclipse看起来已经在某种程度上停止了流血,在今年的过程中仅下降了2%,占市场的38%。

What’s interesting here is that most of the market share gained by IntelliJ is, surprisingly, from NetBeans and not Eclipse.

这里有趣的是,IntelliJ获得的大部分市场份额竟然是来自NetBeans而不是Eclipse。

6. Web/Application Server Adoption

6.网络/应用服务器的采用

Here’s what the server landscape looks like today:

This is actually a new question in the survey, so there are no 2017 numbers to compare the data to, but the conclusion is clear and not at all surprising.

以下是今天服务器的情况:

这实际上是调查中的一个新问题,所以没有2017年的数据可供比较,但结论很清楚,一点也不令人惊讶。

Simply put, Tomcat owns the market, with more adoption than everyone else combined, with 62.5%.

简单地说,Tomcat拥有市场,其采用率比其他所有人的总和还要高,达到62.5%。

The other servers look to be used by about 5% of the market, in a relatively even split.

其他服务器看起来被大约5%的市场所使用,分布相对均匀。

7. Other JVM Languages

7.其他JVM语言

On to the last stretch here – what other JVM-based languages are in use out there?

在这里的最后阶段–外面还有哪些基于JVM的语言在使用?

First, 62.8% of projects are single-language, Java-only.

首先,62.8%的项目是单语言的,只用Java。

Here’s what the ecosystem looks like:

以下是该生态系统的情况:

Here’s a look just at the forward-looking projects that do use other languages:

下面我们只看一下那些确实使用其他语言的前瞻性项目:

The primary takeaway here is, of course, Kotlin – which had a crazy year, jumping from 11.4 in 2017 to 28.8% today.

这里的主要收获当然是Kotlin–它经历了疯狂的一年,从2017年的11.4%跃升到今天的28.8%

Scala’s also interesting to look at, going from 28.4% to 21.6% in the course of this year.

Scala的情况也很有趣,在今年的过程中从28.4%下降到21.6%。

8. Conclusion

8.结语

This look at the Java ecosystem in 2018 has certainly been interesting, confirming some trends that were already well-known and bringing some new ones to light.

这次对2018年的Java生态系统的考察无疑是有趣的,证实了一些已经众所周知的趋势,并带来了一些新的趋势。

Spring Boot is now part of most Spring projects, which is not surprising anymore, but still a huge accomplishment, given the relatively short timeline of the project.

Spring Boot现在是大多数Spring项目的一部分,这已经不足为奇,但考虑到项目的时间相对较短,仍然是一个巨大的成就。

On the IDE front, IntelliJ is still growing at a strong pace. And, very much connected, Kotlin is perhaps the biggest “winner” this year, completely changing the landscape of JVM languages out there.

在IDE方面,IntelliJ仍在以强劲的速度增长。而且,在很大程度上,Kotlin可能是今年最大的 “赢家”,完全改变了JVM语言的格局。

Overall, a very cool look at the Java community, and a big thanks to everyone who participated.

总的来说,这是对Java社区的一次非常酷的观察,非常感谢每一位参与的人。