Category

Java 9 jshell OSX bug workaround

Java logo

Java 9 jshell

You’ve downloaded the current build of Java 9, and perhaps Kulla. You try to run jshell and blammo. Stack dump.

Introduction

Table of Contents

So, you’ve installed Java 9 on your Mac. Maybe one of the Early Access builds. I’m playing around with modules, so I’m using the Jigsaw version.

Let’s check.

Let’s run jshell.

D’oh!

Ok, let’s try it with a pre-built kulla.jar from the AdoptOpenJDK Cloudbees instance

Same nonsense.

I even downloaded the kulla sources and built them. No difference.

The Workaround

Table of Contents

Add your hostname to /etc/hosts.

(My hostname is rockhopper – the penguin of course, not the bike).

Summary

Table of Contents

A simple /etc/hosts one liner fixes the problem.

Yay! Now I can use Java as I’ve used LISP since the 80s!

Resources

Table of Contents

5 thoughts on “Java 9 jshell OSX bug workaround”

  1. Still does not work for me. I typed exactly the word ‘rockhopper’ into my /etc/hosts file but alas this was to no avail. I think perhaps you are mistaked about this technique is good approach to fix the bug.

    1. This is the right solution.
      Try running the hostname command. the use the hostname from output of that command in /etc/hosts.

Leave a Reply to Gene De Lisa Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.