DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

SBOMs are essential to circumventing software supply chain attacks, and they provide visibility into various software components.

Related

  • From J2EE to Jakarta EE
  • Introducing Graph Concepts in Java With Eclipse JNoSQL, Part 3: Understanding Janus
  • Introducing Graph Concepts in Java With Eclipse JNoSQL, Part 2: Understanding Neo4j
  • Introducing Graph Concepts in Java With Eclipse JNoSQL

Trending

  • Software Specs 2.0: An Elaborate Example
  • MCP and The Spin-Off CoT Pattern: How AI Agents Really Use Tools
  • How to Reduce Technical Debt With Artificial Intelligence (AI)
  • Docker Model Runner: Running AI Models Locally Made Simple
  1. DZone
  2. Software Design and Architecture
  3. Integration
  4. Hello OpenJ9 on Windows, I Didn’t Expect You so Soon!

Hello OpenJ9 on Windows, I Didn’t Expect You so Soon!

Move over HotSpot, there's a new JVM on the block. See how to get OpenJ9 running on Windows and how it can help with your Java projects.

By 
Holger Voormann user avatar
Holger Voormann
·
Mar. 14, 18 · Tutorial
Likes (10)
Comment
Save
Tweet
Share
18.5K Views

Join the DZone community and get the full member experience.

Join For Free

Faster startup time, lower memory footprint, and higher application throughput only by replacing the Java Virtual Machine? That sounds too good to be true. So far, there has been no real alternative to Oracle’s Java HotSpot VM on Windows. With Eclipse OpenJ9, which emerged from open-sourcing IBM’s J9 VM, there is now the alternative that promises exactly this.

At the end of January, the first OpenJDK 9 with Eclipse OpenJ9 nightly builds for Windows were published, but they were not very stable at that time. This week, I tested the nightly builds again to run the Eclipse IDE and I was pleasantly surprised: OpenJ9 ran without crashing. Here are my results: the start time of the Eclipse Oxygen.2 Java IDE improves with OpenJ9 from 20 to 17 seconds, with some tuning (see below) even to 12 seconds compared to the Java 9 JDK with Oracle’s HotSpot VM on my more than six-year-old laptop. Also, the Windows Task Manager shows less memory used by the Eclipse IDE and tasks like compiling a large project are a bit faster with OpenJ9.

To start the Eclipse IDE with OpenJ9, in eclipse.ini add the following two lines above -vmargs:

-vm
C:\path\to\jdk-9+181\bin\javaw.exe


Embedding the JDK into an Eclipse installation directory as a jre subdirectory does not yet work, but as long as you do not start the Eclipse IDE from the command line from another directory, you can use -vm with jre\bin\javaw.exe. To further improve the startup time, add the following two lines below -vmargs:

-Xtune:virtualized
-Xshareclasses:cacheDir=C:\path\to\shareclasses


The cloning of a GitHub repository fails due to missing certificate authority (CA) certificates. You can fix this OpenJDK 9 issue by replacing the lib\security directory (which contains the cacerts file) with the same directory of an OpenJDK 10 early access build.

In the Eclipse IDE that is running on OpenJDK the standard basic text font defaults (for reasons I don’t know) to Courier New 10 instead of Consolas 10. You can change this in Window > Preferences: General > Appearance > Colors and Fonts by selecting Basic > Text Font and pressing Edit… (if you like, you can also use Source Code Pro 9 like the Clean Sheet theme does).

I have not noticed so far any further differences between the Eclipse IDE running on Oracle’s JDK 9 and the Eclipse IDE running on the current OpenJDK 9 with OpenJ9 nightly build. Debugging and hot code replace works as expected.

Many thanks to the OpenJ9 team! I look forward to the final release. It’s great to have two good open source Java virtual machines for Windows. Who knows, but with only one of the two, neither of the two might be open source today.

PS: If the Eclipse IDE still starts too slowly for you, have a look at a developer build of the upcoming Eclipse Photon IDE.

OpenJ9 Eclipse Integrated development environment Open source Java (programming language)

Published at DZone with permission of Holger Voormann, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • From J2EE to Jakarta EE
  • Introducing Graph Concepts in Java With Eclipse JNoSQL, Part 3: Understanding Janus
  • Introducing Graph Concepts in Java With Eclipse JNoSQL, Part 2: Understanding Neo4j
  • Introducing Graph Concepts in Java With Eclipse JNoSQL

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • [email protected]

Let's be friends: